diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..081eec5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,20 @@ +*.o +*.lo +Makefile +*/Makefile.in +Makefile.in +comskip.app* +comskip.app/* +autom4te* +autom4te*/* +*.libs +*.Plo +*.Po +*.dll +*.dylib +*.a +*.la +*.lai +*.so +*.so.* +*~ \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..7d85a27 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "ffmpeg"] + path = ffmpeg + url = git://source.ffmpeg.org/ffmpeg.git diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..e69de29 diff --git a/LICENSE b/COPYING similarity index 100% rename from LICENSE rename to COPYING diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..9e847e8 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,3676 @@ +commit c675b07 +Author: hiroyuki nagata +Date: 2013-11-17 + + Modify comskip_wrapper.sh. Add CM cut and concat function by ffmpeg. + +misc/comskip_wrapper.sh + +commit 6fd19af +Author: hiroyuki nagata +Date: 2013-11-17 + + Add comskip_wrapper.sh. + +misc/comskip_wrapper.sh + +commit 71ee9e5 +Author: hiroyuki nagata +Date: 2013-11-17 + + Modify bootstrap and misc file. + +bootstrap +config.h +misc/comskip_wrapper.sh + +commit 858733b +Author: hiroyuki nagata +Date: 2013-11-17 + + Add ffmpeg n1.2.3 under the control of the git. + +ffmpeg/COPYING.GPLv2 +ffmpeg/COPYING.GPLv3 +ffmpeg/COPYING.LGPLv2.1 +ffmpeg/COPYING.LGPLv3 +ffmpeg/CREDITS +ffmpeg/Changelog +ffmpeg/INSTALL +ffmpeg/LICENSE +ffmpeg/MAINTAINERS +ffmpeg/README +ffmpeg/RELEASE +ffmpeg/VERSION +ffmpeg/arch.mak +ffmpeg/cmdutils.c +ffmpeg/cmdutils.h +ffmpeg/cmdutils_common_opts.h +ffmpeg/common.mak +ffmpeg/compat/getopt.c +ffmpeg/compat/msvcrt/snprintf.c +ffmpeg/compat/msvcrt/snprintf.h +ffmpeg/compat/plan9/head +ffmpeg/compat/plan9/main.c +ffmpeg/compat/plan9/printf +ffmpeg/compat/strtod.c +ffmpeg/compat/tms470/math.h +ffmpeg/compat/va_copy.h +ffmpeg/configure +ffmpeg/doc/APIchanges +ffmpeg/doc/Doxyfile +ffmpeg/doc/RELEASE_NOTES +ffmpeg/doc/authors.texi +ffmpeg/doc/avtools-common-opts.texi +ffmpeg/doc/avutil.txt +ffmpeg/doc/bitstream_filters.texi +ffmpeg/doc/build_system.txt +ffmpeg/doc/decoders.texi +ffmpeg/doc/default.css +ffmpeg/doc/demuxers.texi +ffmpeg/doc/developer.texi +ffmpeg/doc/doxy-wrapper.sh +ffmpeg/doc/doxy/doxy_stylesheet.css +ffmpeg/doc/doxy/footer.html +ffmpeg/doc/doxy/header.html +ffmpeg/doc/encoders.texi +ffmpeg/doc/errno.txt +ffmpeg/doc/eval.texi +ffmpeg/doc/examples/README +ffmpeg/doc/examples/decoding_encoding.c +ffmpeg/doc/examples/demuxing.c +ffmpeg/doc/examples/filtering_audio.c +ffmpeg/doc/examples/filtering_video.c +ffmpeg/doc/examples/metadata.c +ffmpeg/doc/examples/muxing.c +ffmpeg/doc/examples/resampling_audio.c +ffmpeg/doc/examples/scaling_video.c +ffmpeg/doc/faq.texi +ffmpeg/doc/fate.texi +ffmpeg/doc/fate_config.sh.template +ffmpeg/doc/ffmpeg-bitstream-filters.texi +ffmpeg/doc/ffmpeg-codecs.texi +ffmpeg/doc/ffmpeg-devices.texi +ffmpeg/doc/ffmpeg-filters.texi +ffmpeg/doc/ffmpeg-formats.texi +ffmpeg/doc/ffmpeg-protocols.texi +ffmpeg/doc/ffmpeg-resampler.texi +ffmpeg/doc/ffmpeg-scaler.texi +ffmpeg/doc/ffmpeg-utils.texi +ffmpeg/doc/ffmpeg.texi +ffmpeg/doc/ffmpeg.txt +ffmpeg/doc/ffplay.texi +ffmpeg/doc/ffprobe.texi +ffmpeg/doc/ffprobe.xsd +ffmpeg/doc/ffserver.conf +ffmpeg/doc/ffserver.texi +ffmpeg/doc/filter_design.txt +ffmpeg/doc/filters.texi +ffmpeg/doc/general.texi +ffmpeg/doc/git-howto.texi +ffmpeg/doc/git-howto.txt +ffmpeg/doc/indevs.texi +ffmpeg/doc/issue_tracker.txt +ffmpeg/doc/libavcodec.texi +ffmpeg/doc/libavdevice.texi +ffmpeg/doc/libavfilter.texi +ffmpeg/doc/libavformat.texi +ffmpeg/doc/libavutil.texi +ffmpeg/doc/libswresample.texi +ffmpeg/doc/libswscale.texi +ffmpeg/doc/metadata.texi +ffmpeg/doc/mips.txt +ffmpeg/doc/multithreading.txt +ffmpeg/doc/muxers.texi +ffmpeg/doc/nut.texi +ffmpeg/doc/optimization.txt +ffmpeg/doc/outdevs.texi +ffmpeg/doc/platform.texi +ffmpeg/doc/print_options.c +ffmpeg/doc/protocols.texi +ffmpeg/doc/rate_distortion.txt +ffmpeg/doc/snow.txt +ffmpeg/doc/soc.txt +ffmpeg/doc/swresample.txt +ffmpeg/doc/swscale.txt +ffmpeg/doc/syntax.texi +ffmpeg/doc/t2h.init +ffmpeg/doc/tablegen.txt +ffmpeg/doc/texi2pod.pl +ffmpeg/doc/viterbi.txt +ffmpeg/ffmpeg.c +ffmpeg/ffmpeg.h +ffmpeg/ffmpeg_filter.c +ffmpeg/ffmpeg_opt.c +ffmpeg/ffplay.c +ffmpeg/ffprobe.c +ffmpeg/ffserver.c +ffmpeg/libavcodec/012v.c +ffmpeg/libavcodec/4xm.c +ffmpeg/libavcodec/8bps.c +ffmpeg/libavcodec/8svx.c +ffmpeg/libavcodec/a64colors.h +ffmpeg/libavcodec/a64enc.h +ffmpeg/libavcodec/a64multienc.c +ffmpeg/libavcodec/a64tables.h +ffmpeg/libavcodec/aac.h +ffmpeg/libavcodec/aac_ac3_parser.c +ffmpeg/libavcodec/aac_ac3_parser.h +ffmpeg/libavcodec/aac_adtstoasc_bsf.c +ffmpeg/libavcodec/aac_parser.c +ffmpeg/libavcodec/aac_tablegen.c +ffmpeg/libavcodec/aac_tablegen.h +ffmpeg/libavcodec/aac_tablegen_decl.h +ffmpeg/libavcodec/aacadtsdec.c +ffmpeg/libavcodec/aacadtsdec.h +ffmpeg/libavcodec/aaccoder.c +ffmpeg/libavcodec/aacdec.c +ffmpeg/libavcodec/aacdectab.h +ffmpeg/libavcodec/aacenc.c +ffmpeg/libavcodec/aacenc.h +ffmpeg/libavcodec/aacps.c +ffmpeg/libavcodec/aacps.h +ffmpeg/libavcodec/aacps_tablegen.c +ffmpeg/libavcodec/aacps_tablegen.h +ffmpeg/libavcodec/aacpsdata.c +ffmpeg/libavcodec/aacpsdsp.c +ffmpeg/libavcodec/aacpsdsp.h +ffmpeg/libavcodec/aacpsy.c +ffmpeg/libavcodec/aacpsy.h +ffmpeg/libavcodec/aacsbr.c +ffmpeg/libavcodec/aacsbr.h +ffmpeg/libavcodec/aacsbrdata.h +ffmpeg/libavcodec/aactab.c +ffmpeg/libavcodec/aactab.h +ffmpeg/libavcodec/aandcttab.c +ffmpeg/libavcodec/aandcttab.h +ffmpeg/libavcodec/aasc.c +ffmpeg/libavcodec/ac3.c +ffmpeg/libavcodec/ac3.h +ffmpeg/libavcodec/ac3_parser.c +ffmpeg/libavcodec/ac3_parser.h +ffmpeg/libavcodec/ac3dec.c +ffmpeg/libavcodec/ac3dec.h +ffmpeg/libavcodec/ac3dec_data.c +ffmpeg/libavcodec/ac3dec_data.h +ffmpeg/libavcodec/ac3dsp.c +ffmpeg/libavcodec/ac3dsp.h +ffmpeg/libavcodec/ac3enc.c +ffmpeg/libavcodec/ac3enc.h +ffmpeg/libavcodec/ac3enc_fixed.c +ffmpeg/libavcodec/ac3enc_float.c +ffmpeg/libavcodec/ac3enc_opts_template.c +ffmpeg/libavcodec/ac3enc_template.c +ffmpeg/libavcodec/ac3tab.c +ffmpeg/libavcodec/ac3tab.h +ffmpeg/libavcodec/acelp_filters.c +ffmpeg/libavcodec/acelp_filters.h +ffmpeg/libavcodec/acelp_pitch_delay.c +ffmpeg/libavcodec/acelp_pitch_delay.h +ffmpeg/libavcodec/acelp_vectors.c +ffmpeg/libavcodec/acelp_vectors.h +ffmpeg/libavcodec/adpcm.c +ffmpeg/libavcodec/adpcm.h +ffmpeg/libavcodec/adpcm_data.c +ffmpeg/libavcodec/adpcm_data.h +ffmpeg/libavcodec/adpcmenc.c +ffmpeg/libavcodec/adx.c +ffmpeg/libavcodec/adx.h +ffmpeg/libavcodec/adx_parser.c +ffmpeg/libavcodec/adxdec.c +ffmpeg/libavcodec/adxenc.c +ffmpeg/libavcodec/alac.c +ffmpeg/libavcodec/alac_data.c +ffmpeg/libavcodec/alac_data.h +ffmpeg/libavcodec/alacenc.c +ffmpeg/libavcodec/allcodecs.c +ffmpeg/libavcodec/alpha/asm.h +ffmpeg/libavcodec/alpha/dsputil_alpha.c +ffmpeg/libavcodec/alpha/dsputil_alpha.h +ffmpeg/libavcodec/alpha/dsputil_alpha_asm.S +ffmpeg/libavcodec/alpha/motion_est_alpha.c +ffmpeg/libavcodec/alpha/motion_est_mvi_asm.S +ffmpeg/libavcodec/alpha/mpegvideo_alpha.c +ffmpeg/libavcodec/alpha/regdef.h +ffmpeg/libavcodec/alpha/simple_idct_alpha.c +ffmpeg/libavcodec/alsdec.c +ffmpeg/libavcodec/amr.h +ffmpeg/libavcodec/amrnbdata.h +ffmpeg/libavcodec/amrnbdec.c +ffmpeg/libavcodec/amrwbdata.h +ffmpeg/libavcodec/amrwbdec.c +ffmpeg/libavcodec/anm.c +ffmpeg/libavcodec/ansi.c +ffmpeg/libavcodec/apedec.c +ffmpeg/libavcodec/arm/aac.h +ffmpeg/libavcodec/arm/aacpsdsp_init_arm.c +ffmpeg/libavcodec/arm/aacpsdsp_neon.S +ffmpeg/libavcodec/arm/ac3dsp_arm.S +ffmpeg/libavcodec/arm/ac3dsp_armv6.S +ffmpeg/libavcodec/arm/ac3dsp_init_arm.c +ffmpeg/libavcodec/arm/ac3dsp_neon.S +ffmpeg/libavcodec/arm/asm-offsets.h +ffmpeg/libavcodec/arm/dca.h +ffmpeg/libavcodec/arm/dcadsp_init_arm.c +ffmpeg/libavcodec/arm/dcadsp_neon.S +ffmpeg/libavcodec/arm/dsputil_arm.S +ffmpeg/libavcodec/arm/dsputil_arm.h +ffmpeg/libavcodec/arm/dsputil_armv6.S +ffmpeg/libavcodec/arm/dsputil_init_arm.c +ffmpeg/libavcodec/arm/dsputil_init_armv5te.c +ffmpeg/libavcodec/arm/dsputil_init_armv6.c +ffmpeg/libavcodec/arm/dsputil_init_neon.c +ffmpeg/libavcodec/arm/dsputil_neon.S +ffmpeg/libavcodec/arm/fft_fixed_init_arm.c +ffmpeg/libavcodec/arm/fft_fixed_neon.S +ffmpeg/libavcodec/arm/fft_init_arm.c +ffmpeg/libavcodec/arm/fft_neon.S +ffmpeg/libavcodec/arm/flacdsp_arm.S +ffmpeg/libavcodec/arm/flacdsp_init_arm.c +ffmpeg/libavcodec/arm/fmtconvert_init_arm.c +ffmpeg/libavcodec/arm/fmtconvert_neon.S +ffmpeg/libavcodec/arm/fmtconvert_vfp.S +ffmpeg/libavcodec/arm/h264chroma_init_arm.c +ffmpeg/libavcodec/arm/h264cmc_neon.S +ffmpeg/libavcodec/arm/h264dsp_init_arm.c +ffmpeg/libavcodec/arm/h264dsp_neon.S +ffmpeg/libavcodec/arm/h264idct_neon.S +ffmpeg/libavcodec/arm/h264pred_init_arm.c +ffmpeg/libavcodec/arm/h264pred_neon.S +ffmpeg/libavcodec/arm/h264qpel_init_arm.c +ffmpeg/libavcodec/arm/h264qpel_neon.S +ffmpeg/libavcodec/arm/int_neon.S +ffmpeg/libavcodec/arm/jrevdct_arm.S +ffmpeg/libavcodec/arm/mathops.h +ffmpeg/libavcodec/arm/mdct_fixed_neon.S +ffmpeg/libavcodec/arm/mdct_neon.S +ffmpeg/libavcodec/arm/mpegaudiodsp_fixed_armv6.S +ffmpeg/libavcodec/arm/mpegaudiodsp_init_arm.c +ffmpeg/libavcodec/arm/mpegvideo_arm.c +ffmpeg/libavcodec/arm/mpegvideo_arm.h +ffmpeg/libavcodec/arm/mpegvideo_armv5te.c +ffmpeg/libavcodec/arm/mpegvideo_armv5te_s.S +ffmpeg/libavcodec/arm/mpegvideo_neon.S +ffmpeg/libavcodec/arm/neon.S +ffmpeg/libavcodec/arm/rdft_neon.S +ffmpeg/libavcodec/arm/rv34dsp_init_arm.c +ffmpeg/libavcodec/arm/rv34dsp_neon.S +ffmpeg/libavcodec/arm/rv40dsp_init_arm.c +ffmpeg/libavcodec/arm/rv40dsp_neon.S +ffmpeg/libavcodec/arm/sbrdsp_init_arm.c +ffmpeg/libavcodec/arm/sbrdsp_neon.S +ffmpeg/libavcodec/arm/simple_idct_arm.S +ffmpeg/libavcodec/arm/simple_idct_armv5te.S +ffmpeg/libavcodec/arm/simple_idct_armv6.S +ffmpeg/libavcodec/arm/simple_idct_neon.S +ffmpeg/libavcodec/arm/synth_filter_neon.S +ffmpeg/libavcodec/arm/videodsp_arm.h +ffmpeg/libavcodec/arm/videodsp_armv5te.S +ffmpeg/libavcodec/arm/videodsp_init_arm.c +ffmpeg/libavcodec/arm/videodsp_init_armv5te.c +ffmpeg/libavcodec/arm/vorbisdsp_init_arm.c +ffmpeg/libavcodec/arm/vorbisdsp_neon.S +ffmpeg/libavcodec/arm/vp3dsp_init_arm.c +ffmpeg/libavcodec/arm/vp3dsp_neon.S +ffmpeg/libavcodec/arm/vp56_arith.h +ffmpeg/libavcodec/arm/vp56dsp_init_arm.c +ffmpeg/libavcodec/arm/vp56dsp_neon.S +ffmpeg/libavcodec/arm/vp8.h +ffmpeg/libavcodec/arm/vp8_armv6.S +ffmpeg/libavcodec/arm/vp8dsp.h +ffmpeg/libavcodec/arm/vp8dsp_armv6.S +ffmpeg/libavcodec/arm/vp8dsp_init_arm.c +ffmpeg/libavcodec/arm/vp8dsp_init_armv6.c +ffmpeg/libavcodec/arm/vp8dsp_init_neon.c +ffmpeg/libavcodec/arm/vp8dsp_neon.S +ffmpeg/libavcodec/ass.c +ffmpeg/libavcodec/ass.h +ffmpeg/libavcodec/ass_split.c +ffmpeg/libavcodec/ass_split.h +ffmpeg/libavcodec/assdec.c +ffmpeg/libavcodec/assenc.c +ffmpeg/libavcodec/asv.c +ffmpeg/libavcodec/asv.h +ffmpeg/libavcodec/asvdec.c +ffmpeg/libavcodec/asvenc.c +ffmpeg/libavcodec/atrac.c +ffmpeg/libavcodec/atrac.h +ffmpeg/libavcodec/atrac1.c +ffmpeg/libavcodec/atrac1data.h +ffmpeg/libavcodec/atrac3.c +ffmpeg/libavcodec/atrac3data.h +ffmpeg/libavcodec/audio_frame_queue.c +ffmpeg/libavcodec/audio_frame_queue.h +ffmpeg/libavcodec/audioconvert.c +ffmpeg/libavcodec/audioconvert.h +ffmpeg/libavcodec/aura.c +ffmpeg/libavcodec/avcodec.h +ffmpeg/libavcodec/avfft.c +ffmpeg/libavcodec/avfft.h +ffmpeg/libavcodec/avpacket.c +ffmpeg/libavcodec/avpicture.c +ffmpeg/libavcodec/avr32/mathops.h +ffmpeg/libavcodec/avrndec.c +ffmpeg/libavcodec/avs.c +ffmpeg/libavcodec/avuidec.c +ffmpeg/libavcodec/avuienc.c +ffmpeg/libavcodec/bethsoftvideo.c +ffmpeg/libavcodec/bethsoftvideo.h +ffmpeg/libavcodec/bfi.c +ffmpeg/libavcodec/bfin/config_bfin.h +ffmpeg/libavcodec/bfin/dsputil_bfin.c +ffmpeg/libavcodec/bfin/dsputil_bfin.h +ffmpeg/libavcodec/bfin/fdct_bfin.S +ffmpeg/libavcodec/bfin/idct_bfin.S +ffmpeg/libavcodec/bfin/mathops.h +ffmpeg/libavcodec/bfin/mpegvideo_bfin.c +ffmpeg/libavcodec/bfin/pixels_bfin.S +ffmpeg/libavcodec/bfin/vp3_bfin.c +ffmpeg/libavcodec/bfin/vp3_bfin.h +ffmpeg/libavcodec/bfin/vp3_idct_bfin.S +ffmpeg/libavcodec/bgmc.c +ffmpeg/libavcodec/bgmc.h +ffmpeg/libavcodec/bink.c +ffmpeg/libavcodec/binkaudio.c +ffmpeg/libavcodec/binkdata.h +ffmpeg/libavcodec/binkdsp.c +ffmpeg/libavcodec/binkdsp.h +ffmpeg/libavcodec/bintext.c +ffmpeg/libavcodec/bintext.h +ffmpeg/libavcodec/bit_depth_template.c +ffmpeg/libavcodec/bitstream.c +ffmpeg/libavcodec/bitstream_filter.c +ffmpeg/libavcodec/bmp.c +ffmpeg/libavcodec/bmp.h +ffmpeg/libavcodec/bmp_parser.c +ffmpeg/libavcodec/bmpenc.c +ffmpeg/libavcodec/bmv.c +ffmpeg/libavcodec/brender_pix.c +ffmpeg/libavcodec/bytestream.h +ffmpeg/libavcodec/c93.c +ffmpeg/libavcodec/cabac.c +ffmpeg/libavcodec/cabac.h +ffmpeg/libavcodec/cabac_functions.h +ffmpeg/libavcodec/cavs.c +ffmpeg/libavcodec/cavs.h +ffmpeg/libavcodec/cavs_parser.c +ffmpeg/libavcodec/cavsdata.c +ffmpeg/libavcodec/cavsdata.h +ffmpeg/libavcodec/cavsdec.c +ffmpeg/libavcodec/cavsdsp.c +ffmpeg/libavcodec/cavsdsp.h +ffmpeg/libavcodec/cbrt_tablegen.c +ffmpeg/libavcodec/cbrt_tablegen.h +ffmpeg/libavcodec/cdgraphics.c +ffmpeg/libavcodec/cdxl.c +ffmpeg/libavcodec/celp_filters.c +ffmpeg/libavcodec/celp_filters.h +ffmpeg/libavcodec/celp_math.c +ffmpeg/libavcodec/celp_math.h +ffmpeg/libavcodec/cga_data.c +ffmpeg/libavcodec/cga_data.h +ffmpeg/libavcodec/chomp_bsf.c +ffmpeg/libavcodec/cinepak.c +ffmpeg/libavcodec/cljr.c +ffmpeg/libavcodec/cllc.c +ffmpeg/libavcodec/cngdec.c +ffmpeg/libavcodec/cngenc.c +ffmpeg/libavcodec/codec_desc.c +ffmpeg/libavcodec/cook.c +ffmpeg/libavcodec/cook_parser.c +ffmpeg/libavcodec/cookdata.h +ffmpeg/libavcodec/copy_block.h +ffmpeg/libavcodec/cos_tablegen.c +ffmpeg/libavcodec/cpia.c +ffmpeg/libavcodec/crystalhd.c +ffmpeg/libavcodec/cscd.c +ffmpeg/libavcodec/cyuv.c +ffmpeg/libavcodec/dca.c +ffmpeg/libavcodec/dca.h +ffmpeg/libavcodec/dca_parser.c +ffmpeg/libavcodec/dca_parser.h +ffmpeg/libavcodec/dcadata.h +ffmpeg/libavcodec/dcadec.c +ffmpeg/libavcodec/dcadsp.c +ffmpeg/libavcodec/dcadsp.h +ffmpeg/libavcodec/dcaenc.c +ffmpeg/libavcodec/dcaenc.h +ffmpeg/libavcodec/dcahuff.h +ffmpeg/libavcodec/dct-test.c +ffmpeg/libavcodec/dct.c +ffmpeg/libavcodec/dct.h +ffmpeg/libavcodec/dct32.c +ffmpeg/libavcodec/dct32.h +ffmpeg/libavcodec/dct32_fixed.c +ffmpeg/libavcodec/dct32_float.c +ffmpeg/libavcodec/dctref.c +ffmpeg/libavcodec/dctref.h +ffmpeg/libavcodec/dfa.c +ffmpeg/libavcodec/dirac.c +ffmpeg/libavcodec/dirac.h +ffmpeg/libavcodec/dirac_arith.c +ffmpeg/libavcodec/dirac_arith.h +ffmpeg/libavcodec/dirac_dwt.c +ffmpeg/libavcodec/dirac_dwt.h +ffmpeg/libavcodec/dirac_parser.c +ffmpeg/libavcodec/diracdec.c +ffmpeg/libavcodec/diracdsp.c +ffmpeg/libavcodec/diracdsp.h +ffmpeg/libavcodec/dnxhd_parser.c +ffmpeg/libavcodec/dnxhddata.c +ffmpeg/libavcodec/dnxhddata.h +ffmpeg/libavcodec/dnxhddec.c +ffmpeg/libavcodec/dnxhdenc.c +ffmpeg/libavcodec/dnxhdenc.h +ffmpeg/libavcodec/dpcm.c +ffmpeg/libavcodec/dpx.c +ffmpeg/libavcodec/dpxenc.c +ffmpeg/libavcodec/dsicinav.c +ffmpeg/libavcodec/dsputil.c +ffmpeg/libavcodec/dsputil.h +ffmpeg/libavcodec/dsputil_template.c +ffmpeg/libavcodec/dump_extradata_bsf.c +ffmpeg/libavcodec/dv.c +ffmpeg/libavcodec/dv_profile.c +ffmpeg/libavcodec/dv_profile.h +ffmpeg/libavcodec/dv_tablegen.c +ffmpeg/libavcodec/dv_tablegen.h +ffmpeg/libavcodec/dv_vlc_data.h +ffmpeg/libavcodec/dvbsub.c +ffmpeg/libavcodec/dvbsub_parser.c +ffmpeg/libavcodec/dvbsubdec.c +ffmpeg/libavcodec/dvdata.c +ffmpeg/libavcodec/dvdata.h +ffmpeg/libavcodec/dvdec.c +ffmpeg/libavcodec/dvdsub_parser.c +ffmpeg/libavcodec/dvdsubdec.c +ffmpeg/libavcodec/dvdsubenc.c +ffmpeg/libavcodec/dxa.c +ffmpeg/libavcodec/dxtory.c +ffmpeg/libavcodec/dxva2.c +ffmpeg/libavcodec/dxva2.h +ffmpeg/libavcodec/dxva2_h264.c +ffmpeg/libavcodec/dxva2_internal.h +ffmpeg/libavcodec/dxva2_mpeg2.c +ffmpeg/libavcodec/dxva2_vc1.c +ffmpeg/libavcodec/eac3_data.c +ffmpeg/libavcodec/eac3_data.h +ffmpeg/libavcodec/eac3dec.c +ffmpeg/libavcodec/eac3enc.c +ffmpeg/libavcodec/eac3enc.h +ffmpeg/libavcodec/eacmv.c +ffmpeg/libavcodec/eaidct.c +ffmpeg/libavcodec/eaidct.h +ffmpeg/libavcodec/eamad.c +ffmpeg/libavcodec/eatgq.c +ffmpeg/libavcodec/eatgv.c +ffmpeg/libavcodec/eatqi.c +ffmpeg/libavcodec/elbg.c +ffmpeg/libavcodec/elbg.h +ffmpeg/libavcodec/error_resilience.c +ffmpeg/libavcodec/error_resilience.h +ffmpeg/libavcodec/escape124.c +ffmpeg/libavcodec/escape130.c +ffmpeg/libavcodec/evrcdata.h +ffmpeg/libavcodec/evrcdec.c +ffmpeg/libavcodec/exr.c +ffmpeg/libavcodec/faandct.c +ffmpeg/libavcodec/faandct.h +ffmpeg/libavcodec/faanidct.c +ffmpeg/libavcodec/faanidct.h +ffmpeg/libavcodec/faxcompr.c +ffmpeg/libavcodec/faxcompr.h +ffmpeg/libavcodec/fft-fixed-test.c +ffmpeg/libavcodec/fft-internal.h +ffmpeg/libavcodec/fft-test.c +ffmpeg/libavcodec/fft.c +ffmpeg/libavcodec/fft.h +ffmpeg/libavcodec/fft_fixed.c +ffmpeg/libavcodec/fft_float.c +ffmpeg/libavcodec/ffv1.c +ffmpeg/libavcodec/ffv1.h +ffmpeg/libavcodec/ffv1dec.c +ffmpeg/libavcodec/ffv1enc.c +ffmpeg/libavcodec/ffwavesynth.c +ffmpeg/libavcodec/flac.c +ffmpeg/libavcodec/flac.h +ffmpeg/libavcodec/flac_parser.c +ffmpeg/libavcodec/flacdata.c +ffmpeg/libavcodec/flacdata.h +ffmpeg/libavcodec/flacdec.c +ffmpeg/libavcodec/flacdsp.c +ffmpeg/libavcodec/flacdsp.h +ffmpeg/libavcodec/flacdsp_lpc_template.c +ffmpeg/libavcodec/flacdsp_template.c +ffmpeg/libavcodec/flacenc.c +ffmpeg/libavcodec/flashsv.c +ffmpeg/libavcodec/flashsv2enc.c +ffmpeg/libavcodec/flashsvenc.c +ffmpeg/libavcodec/flicvideo.c +ffmpeg/libavcodec/flv.h +ffmpeg/libavcodec/flvdec.c +ffmpeg/libavcodec/flvenc.c +ffmpeg/libavcodec/fmtconvert.c +ffmpeg/libavcodec/fmtconvert.h +ffmpeg/libavcodec/frame_thread_encoder.c +ffmpeg/libavcodec/frame_thread_encoder.h +ffmpeg/libavcodec/fraps.c +ffmpeg/libavcodec/frwu.c +ffmpeg/libavcodec/g722.c +ffmpeg/libavcodec/g722.h +ffmpeg/libavcodec/g722dec.c +ffmpeg/libavcodec/g722enc.c +ffmpeg/libavcodec/g723_1.c +ffmpeg/libavcodec/g723_1_data.h +ffmpeg/libavcodec/g726.c +ffmpeg/libavcodec/g729.h +ffmpeg/libavcodec/g729data.h +ffmpeg/libavcodec/g729dec.c +ffmpeg/libavcodec/g729postfilter.c +ffmpeg/libavcodec/g729postfilter.h +ffmpeg/libavcodec/get_bits.h +ffmpeg/libavcodec/gif.c +ffmpeg/libavcodec/gif.h +ffmpeg/libavcodec/gifdec.c +ffmpeg/libavcodec/golomb-test.c +ffmpeg/libavcodec/golomb.c +ffmpeg/libavcodec/golomb.h +ffmpeg/libavcodec/gsm.h +ffmpeg/libavcodec/gsm_parser.c +ffmpeg/libavcodec/gsmdec.c +ffmpeg/libavcodec/gsmdec_data.c +ffmpeg/libavcodec/gsmdec_data.h +ffmpeg/libavcodec/gsmdec_template.c +ffmpeg/libavcodec/h261.c +ffmpeg/libavcodec/h261.h +ffmpeg/libavcodec/h261_parser.c +ffmpeg/libavcodec/h261data.c +ffmpeg/libavcodec/h261data.h +ffmpeg/libavcodec/h261dec.c +ffmpeg/libavcodec/h261enc.c +ffmpeg/libavcodec/h263.c +ffmpeg/libavcodec/h263.h +ffmpeg/libavcodec/h263_parser.c +ffmpeg/libavcodec/h263_parser.h +ffmpeg/libavcodec/h263data.h +ffmpeg/libavcodec/h263dec.c +ffmpeg/libavcodec/h264.c +ffmpeg/libavcodec/h264.h +ffmpeg/libavcodec/h264_cabac.c +ffmpeg/libavcodec/h264_cavlc.c +ffmpeg/libavcodec/h264_direct.c +ffmpeg/libavcodec/h264_loopfilter.c +ffmpeg/libavcodec/h264_mb_template.c +ffmpeg/libavcodec/h264_mc_template.c +ffmpeg/libavcodec/h264_mp4toannexb_bsf.c +ffmpeg/libavcodec/h264_mvpred.h +ffmpeg/libavcodec/h264_parser.c +ffmpeg/libavcodec/h264_ps.c +ffmpeg/libavcodec/h264_refs.c +ffmpeg/libavcodec/h264_sei.c +ffmpeg/libavcodec/h264addpx_template.c +ffmpeg/libavcodec/h264chroma.c +ffmpeg/libavcodec/h264chroma.h +ffmpeg/libavcodec/h264chroma_template.c +ffmpeg/libavcodec/h264data.h +ffmpeg/libavcodec/h264dsp.c +ffmpeg/libavcodec/h264dsp.h +ffmpeg/libavcodec/h264dsp_template.c +ffmpeg/libavcodec/h264idct.c +ffmpeg/libavcodec/h264idct.h +ffmpeg/libavcodec/h264idct_template.c +ffmpeg/libavcodec/h264pred.c +ffmpeg/libavcodec/h264pred.h +ffmpeg/libavcodec/h264pred_template.c +ffmpeg/libavcodec/h264qpel.c +ffmpeg/libavcodec/h264qpel.h +ffmpeg/libavcodec/h264qpel_template.c +ffmpeg/libavcodec/hpel_template.c +ffmpeg/libavcodec/huffman.c +ffmpeg/libavcodec/huffman.h +ffmpeg/libavcodec/huffyuv.c +ffmpeg/libavcodec/huffyuv.h +ffmpeg/libavcodec/huffyuvdec.c +ffmpeg/libavcodec/huffyuvenc.c +ffmpeg/libavcodec/idcinvideo.c +ffmpeg/libavcodec/iff.c +ffmpeg/libavcodec/iirfilter.c +ffmpeg/libavcodec/iirfilter.h +ffmpeg/libavcodec/imc.c +ffmpeg/libavcodec/imcdata.h +ffmpeg/libavcodec/imgconvert.c +ffmpeg/libavcodec/imgconvert.h +ffmpeg/libavcodec/imx_dump_header_bsf.c +ffmpeg/libavcodec/indeo2.c +ffmpeg/libavcodec/indeo2data.h +ffmpeg/libavcodec/indeo3.c +ffmpeg/libavcodec/indeo3data.h +ffmpeg/libavcodec/indeo4.c +ffmpeg/libavcodec/indeo4data.h +ffmpeg/libavcodec/indeo5.c +ffmpeg/libavcodec/indeo5data.h +ffmpeg/libavcodec/intelh263dec.c +ffmpeg/libavcodec/internal.h +ffmpeg/libavcodec/interplayvideo.c +ffmpeg/libavcodec/intrax8.c +ffmpeg/libavcodec/intrax8.h +ffmpeg/libavcodec/intrax8dsp.c +ffmpeg/libavcodec/intrax8dsp.h +ffmpeg/libavcodec/intrax8huf.h +ffmpeg/libavcodec/ituh263dec.c +ffmpeg/libavcodec/ituh263enc.c +ffmpeg/libavcodec/ivi_common.c +ffmpeg/libavcodec/ivi_common.h +ffmpeg/libavcodec/ivi_dsp.c +ffmpeg/libavcodec/ivi_dsp.h +ffmpeg/libavcodec/j2k.c +ffmpeg/libavcodec/j2k.h +ffmpeg/libavcodec/j2k_dwt.c +ffmpeg/libavcodec/j2k_dwt.h +ffmpeg/libavcodec/j2kdec.c +ffmpeg/libavcodec/j2kenc.c +ffmpeg/libavcodec/jacosub.h +ffmpeg/libavcodec/jacosubdec.c +ffmpeg/libavcodec/jfdctfst.c +ffmpeg/libavcodec/jfdctint.c +ffmpeg/libavcodec/jfdctint_template.c +ffmpeg/libavcodec/jpegls.c +ffmpeg/libavcodec/jpegls.h +ffmpeg/libavcodec/jpeglsdec.c +ffmpeg/libavcodec/jpeglsdec.h +ffmpeg/libavcodec/jpeglsenc.c +ffmpeg/libavcodec/jrevdct.c +ffmpeg/libavcodec/jvdec.c +ffmpeg/libavcodec/kbdwin.c +ffmpeg/libavcodec/kbdwin.h +ffmpeg/libavcodec/kgv1dec.c +ffmpeg/libavcodec/kmvc.c +ffmpeg/libavcodec/lagarith.c +ffmpeg/libavcodec/lagarithrac.c +ffmpeg/libavcodec/lagarithrac.h +ffmpeg/libavcodec/latm_parser.c +ffmpeg/libavcodec/lcl.h +ffmpeg/libavcodec/lcldec.c +ffmpeg/libavcodec/lclenc.c +ffmpeg/libavcodec/libaacplus.c +ffmpeg/libavcodec/libavcodec.v +ffmpeg/libavcodec/libcelt_dec.c +ffmpeg/libavcodec/libfaac.c +ffmpeg/libavcodec/libfdk-aacenc.c +ffmpeg/libavcodec/libgsm.c +ffmpeg/libavcodec/libilbc.c +ffmpeg/libavcodec/libmp3lame.c +ffmpeg/libavcodec/libopencore-amr.c +ffmpeg/libavcodec/libopenjpegdec.c +ffmpeg/libavcodec/libopenjpegenc.c +ffmpeg/libavcodec/libopus.c +ffmpeg/libavcodec/libopus.h +ffmpeg/libavcodec/libopusdec.c +ffmpeg/libavcodec/libopusenc.c +ffmpeg/libavcodec/libschroedinger.c +ffmpeg/libavcodec/libschroedinger.h +ffmpeg/libavcodec/libschroedingerdec.c +ffmpeg/libavcodec/libschroedingerenc.c +ffmpeg/libavcodec/libspeexdec.c +ffmpeg/libavcodec/libspeexenc.c +ffmpeg/libavcodec/libstagefright.cpp +ffmpeg/libavcodec/libtheoraenc.c +ffmpeg/libavcodec/libtwolame.c +ffmpeg/libavcodec/libutvideo.h +ffmpeg/libavcodec/libutvideodec.cpp +ffmpeg/libavcodec/libutvideoenc.cpp +ffmpeg/libavcodec/libvo-aacenc.c +ffmpeg/libavcodec/libvo-amrwbenc.c +ffmpeg/libavcodec/libvorbisdec.c +ffmpeg/libavcodec/libvorbisenc.c +ffmpeg/libavcodec/libvpxdec.c +ffmpeg/libavcodec/libvpxenc.c +ffmpeg/libavcodec/libx264.c +ffmpeg/libavcodec/libxavs.c +ffmpeg/libavcodec/libxvid.c +ffmpeg/libavcodec/libxvid.h +ffmpeg/libavcodec/libxvid_rc.c +ffmpeg/libavcodec/ljpegenc.c +ffmpeg/libavcodec/loco.c +ffmpeg/libavcodec/log2_tab.c +ffmpeg/libavcodec/lpc.c +ffmpeg/libavcodec/lpc.h +ffmpeg/libavcodec/lsp.c +ffmpeg/libavcodec/lsp.h +ffmpeg/libavcodec/lzw.c +ffmpeg/libavcodec/lzw.h +ffmpeg/libavcodec/lzwenc.c +ffmpeg/libavcodec/mace.c +ffmpeg/libavcodec/mathops.h +ffmpeg/libavcodec/mathtables.c +ffmpeg/libavcodec/mdct.c +ffmpeg/libavcodec/mdct_fixed.c +ffmpeg/libavcodec/mdct_float.c +ffmpeg/libavcodec/mdec.c +ffmpeg/libavcodec/microdvddec.c +ffmpeg/libavcodec/mimic.c +ffmpeg/libavcodec/mips/aacdec_mips.c +ffmpeg/libavcodec/mips/aacdec_mips.h +ffmpeg/libavcodec/mips/aacpsdsp_mips.c +ffmpeg/libavcodec/mips/aacsbr_mips.c +ffmpeg/libavcodec/mips/aacsbr_mips.h +ffmpeg/libavcodec/mips/ac3dsp_mips.c +ffmpeg/libavcodec/mips/acelp_filters_mips.c +ffmpeg/libavcodec/mips/acelp_vectors_mips.c +ffmpeg/libavcodec/mips/amrwbdec_mips.c +ffmpeg/libavcodec/mips/amrwbdec_mips.h +ffmpeg/libavcodec/mips/celp_filters_mips.c +ffmpeg/libavcodec/mips/celp_math_mips.c +ffmpeg/libavcodec/mips/compute_antialias_fixed.h +ffmpeg/libavcodec/mips/compute_antialias_float.h +ffmpeg/libavcodec/mips/fft_init_table.c +ffmpeg/libavcodec/mips/fft_mips.c +ffmpeg/libavcodec/mips/fft_table.h +ffmpeg/libavcodec/mips/fmtconvert_mips.c +ffmpeg/libavcodec/mips/lsp_mips.h +ffmpeg/libavcodec/mips/mathops.h +ffmpeg/libavcodec/mips/mpegaudiodsp_mips_fixed.c +ffmpeg/libavcodec/mips/mpegaudiodsp_mips_float.c +ffmpeg/libavcodec/mips/sbrdsp_mips.c +ffmpeg/libavcodec/mjpeg.c +ffmpeg/libavcodec/mjpeg.h +ffmpeg/libavcodec/mjpeg2jpeg_bsf.c +ffmpeg/libavcodec/mjpeg_parser.c +ffmpeg/libavcodec/mjpega_dump_header_bsf.c +ffmpeg/libavcodec/mjpegbdec.c +ffmpeg/libavcodec/mjpegdec.c +ffmpeg/libavcodec/mjpegdec.h +ffmpeg/libavcodec/mjpegenc.c +ffmpeg/libavcodec/mjpegenc.h +ffmpeg/libavcodec/mlp.c +ffmpeg/libavcodec/mlp.h +ffmpeg/libavcodec/mlp_parser.c +ffmpeg/libavcodec/mlp_parser.h +ffmpeg/libavcodec/mlpdec.c +ffmpeg/libavcodec/mlpdsp.c +ffmpeg/libavcodec/mlpdsp.h +ffmpeg/libavcodec/mmvideo.c +ffmpeg/libavcodec/motion-test.c +ffmpeg/libavcodec/motion_est.c +ffmpeg/libavcodec/motion_est_template.c +ffmpeg/libavcodec/motionpixels.c +ffmpeg/libavcodec/motionpixels_tablegen.c +ffmpeg/libavcodec/motionpixels_tablegen.h +ffmpeg/libavcodec/movsub_bsf.c +ffmpeg/libavcodec/movtextdec.c +ffmpeg/libavcodec/movtextenc.c +ffmpeg/libavcodec/mp3_header_compress_bsf.c +ffmpeg/libavcodec/mp3_header_decompress_bsf.c +ffmpeg/libavcodec/mpc.c +ffmpeg/libavcodec/mpc.h +ffmpeg/libavcodec/mpc7.c +ffmpeg/libavcodec/mpc7data.h +ffmpeg/libavcodec/mpc8.c +ffmpeg/libavcodec/mpc8data.h +ffmpeg/libavcodec/mpc8huff.h +ffmpeg/libavcodec/mpcdata.h +ffmpeg/libavcodec/mpeg12.c +ffmpeg/libavcodec/mpeg12.h +ffmpeg/libavcodec/mpeg12data.c +ffmpeg/libavcodec/mpeg12data.h +ffmpeg/libavcodec/mpeg12decdata.h +ffmpeg/libavcodec/mpeg12enc.c +ffmpeg/libavcodec/mpeg4audio.c +ffmpeg/libavcodec/mpeg4audio.h +ffmpeg/libavcodec/mpeg4data.h +ffmpeg/libavcodec/mpeg4video.c +ffmpeg/libavcodec/mpeg4video.h +ffmpeg/libavcodec/mpeg4video_parser.c +ffmpeg/libavcodec/mpeg4video_parser.h +ffmpeg/libavcodec/mpeg4videodec.c +ffmpeg/libavcodec/mpeg4videoenc.c +ffmpeg/libavcodec/mpegaudio.c +ffmpeg/libavcodec/mpegaudio.h +ffmpeg/libavcodec/mpegaudio_parser.c +ffmpeg/libavcodec/mpegaudio_tablegen.c +ffmpeg/libavcodec/mpegaudio_tablegen.h +ffmpeg/libavcodec/mpegaudiodata.c +ffmpeg/libavcodec/mpegaudiodata.h +ffmpeg/libavcodec/mpegaudiodec.c +ffmpeg/libavcodec/mpegaudiodec_float.c +ffmpeg/libavcodec/mpegaudiodecheader.c +ffmpeg/libavcodec/mpegaudiodecheader.h +ffmpeg/libavcodec/mpegaudiodectab.h +ffmpeg/libavcodec/mpegaudiodsp.c +ffmpeg/libavcodec/mpegaudiodsp.h +ffmpeg/libavcodec/mpegaudiodsp_data.c +ffmpeg/libavcodec/mpegaudiodsp_fixed.c +ffmpeg/libavcodec/mpegaudiodsp_float.c +ffmpeg/libavcodec/mpegaudiodsp_template.c +ffmpeg/libavcodec/mpegaudioenc.c +ffmpeg/libavcodec/mpegaudiotab.h +ffmpeg/libavcodec/mpegvideo.c +ffmpeg/libavcodec/mpegvideo.h +ffmpeg/libavcodec/mpegvideo_enc.c +ffmpeg/libavcodec/mpegvideo_motion.c +ffmpeg/libavcodec/mpegvideo_parser.c +ffmpeg/libavcodec/mpegvideo_xvmc.c +ffmpeg/libavcodec/mpl2dec.c +ffmpeg/libavcodec/mqc.c +ffmpeg/libavcodec/mqc.h +ffmpeg/libavcodec/mqcdec.c +ffmpeg/libavcodec/mqcenc.c +ffmpeg/libavcodec/msgsmdec.c +ffmpeg/libavcodec/msgsmdec.h +ffmpeg/libavcodec/msmpeg4.c +ffmpeg/libavcodec/msmpeg4.h +ffmpeg/libavcodec/msmpeg4data.c +ffmpeg/libavcodec/msmpeg4data.h +ffmpeg/libavcodec/msmpeg4enc.c +ffmpeg/libavcodec/msrle.c +ffmpeg/libavcodec/msrledec.c +ffmpeg/libavcodec/msrledec.h +ffmpeg/libavcodec/mss1.c +ffmpeg/libavcodec/mss12.c +ffmpeg/libavcodec/mss12.h +ffmpeg/libavcodec/mss2.c +ffmpeg/libavcodec/mss2dsp.c +ffmpeg/libavcodec/mss2dsp.h +ffmpeg/libavcodec/mss3.c +ffmpeg/libavcodec/mss34dsp.c +ffmpeg/libavcodec/mss34dsp.h +ffmpeg/libavcodec/mss4.c +ffmpeg/libavcodec/msvideo1.c +ffmpeg/libavcodec/msvideo1enc.c +ffmpeg/libavcodec/mvcdec.c +ffmpeg/libavcodec/mxpegdec.c +ffmpeg/libavcodec/nellymoser.c +ffmpeg/libavcodec/nellymoser.h +ffmpeg/libavcodec/nellymoserdec.c +ffmpeg/libavcodec/nellymoserenc.c +ffmpeg/libavcodec/noise_bsf.c +ffmpeg/libavcodec/nuv.c +ffmpeg/libavcodec/old_codec_ids.h +ffmpeg/libavcodec/options.c +ffmpeg/libavcodec/options_table.h +ffmpeg/libavcodec/os2threads.h +ffmpeg/libavcodec/paf.c +ffmpeg/libavcodec/paf.h +ffmpeg/libavcodec/pamenc.c +ffmpeg/libavcodec/parser.c +ffmpeg/libavcodec/parser.h +ffmpeg/libavcodec/pcm-mpeg.c +ffmpeg/libavcodec/pcm.c +ffmpeg/libavcodec/pcm_tablegen.c +ffmpeg/libavcodec/pcm_tablegen.h +ffmpeg/libavcodec/pcx.c +ffmpeg/libavcodec/pcxenc.c +ffmpeg/libavcodec/pgssubdec.c +ffmpeg/libavcodec/pictordec.c +ffmpeg/libavcodec/png.c +ffmpeg/libavcodec/png.h +ffmpeg/libavcodec/png_parser.c +ffmpeg/libavcodec/pngdec.c +ffmpeg/libavcodec/pngdsp.c +ffmpeg/libavcodec/pngdsp.h +ffmpeg/libavcodec/pngenc.c +ffmpeg/libavcodec/pnm.c +ffmpeg/libavcodec/pnm.h +ffmpeg/libavcodec/pnm_parser.c +ffmpeg/libavcodec/pnmdec.c +ffmpeg/libavcodec/pnmenc.c +ffmpeg/libavcodec/ppc/asm.S +ffmpeg/libavcodec/ppc/dsputil_altivec.c +ffmpeg/libavcodec/ppc/dsputil_altivec.h +ffmpeg/libavcodec/ppc/dsputil_ppc.c +ffmpeg/libavcodec/ppc/fdct_altivec.c +ffmpeg/libavcodec/ppc/fft_altivec.c +ffmpeg/libavcodec/ppc/fft_altivec_s.S +ffmpeg/libavcodec/ppc/fmtconvert_altivec.c +ffmpeg/libavcodec/ppc/gmc_altivec.c +ffmpeg/libavcodec/ppc/h264_altivec.c +ffmpeg/libavcodec/ppc/h264_qpel.c +ffmpeg/libavcodec/ppc/h264_qpel_template.c +ffmpeg/libavcodec/ppc/h264chroma_init.c +ffmpeg/libavcodec/ppc/h264chroma_template.c +ffmpeg/libavcodec/ppc/idct_altivec.c +ffmpeg/libavcodec/ppc/int_altivec.c +ffmpeg/libavcodec/ppc/mathops.h +ffmpeg/libavcodec/ppc/mpegaudiodec_altivec.c +ffmpeg/libavcodec/ppc/mpegvideo_altivec.c +ffmpeg/libavcodec/ppc/vc1dsp_altivec.c +ffmpeg/libavcodec/ppc/videodsp_ppc.c +ffmpeg/libavcodec/ppc/vorbisdsp_altivec.c +ffmpeg/libavcodec/ppc/vp3dsp_altivec.c +ffmpeg/libavcodec/ppc/vp8dsp_altivec.c +ffmpeg/libavcodec/proresdata.c +ffmpeg/libavcodec/proresdata.h +ffmpeg/libavcodec/proresdec.h +ffmpeg/libavcodec/proresdec2.c +ffmpeg/libavcodec/proresdec_lgpl.c +ffmpeg/libavcodec/proresdsp.c +ffmpeg/libavcodec/proresdsp.h +ffmpeg/libavcodec/proresenc_anatoliy.c +ffmpeg/libavcodec/proresenc_kostya.c +ffmpeg/libavcodec/psymodel.c +ffmpeg/libavcodec/psymodel.h +ffmpeg/libavcodec/pthread.c +ffmpeg/libavcodec/ptx.c +ffmpeg/libavcodec/put_bits.h +ffmpeg/libavcodec/qcelpdata.h +ffmpeg/libavcodec/qcelpdec.c +ffmpeg/libavcodec/qdm2.c +ffmpeg/libavcodec/qdm2_tablegen.c +ffmpeg/libavcodec/qdm2_tablegen.h +ffmpeg/libavcodec/qdm2data.h +ffmpeg/libavcodec/qdrw.c +ffmpeg/libavcodec/qpeg.c +ffmpeg/libavcodec/qtrle.c +ffmpeg/libavcodec/qtrleenc.c +ffmpeg/libavcodec/r210dec.c +ffmpeg/libavcodec/r210enc.c +ffmpeg/libavcodec/ra144.c +ffmpeg/libavcodec/ra144.h +ffmpeg/libavcodec/ra144dec.c +ffmpeg/libavcodec/ra144enc.c +ffmpeg/libavcodec/ra288.c +ffmpeg/libavcodec/ra288.h +ffmpeg/libavcodec/ralf.c +ffmpeg/libavcodec/ralfdata.h +ffmpeg/libavcodec/rangecoder.c +ffmpeg/libavcodec/rangecoder.h +ffmpeg/libavcodec/ratecontrol.c +ffmpeg/libavcodec/ratecontrol.h +ffmpeg/libavcodec/raw.c +ffmpeg/libavcodec/raw.h +ffmpeg/libavcodec/rawdec.c +ffmpeg/libavcodec/rawenc.c +ffmpeg/libavcodec/rdft.c +ffmpeg/libavcodec/rdft.h +ffmpeg/libavcodec/realtextdec.c +ffmpeg/libavcodec/rectangle.h +ffmpeg/libavcodec/remove_extradata_bsf.c +ffmpeg/libavcodec/resample.c +ffmpeg/libavcodec/resample2.c +ffmpeg/libavcodec/rl.h +ffmpeg/libavcodec/rl2.c +ffmpeg/libavcodec/rle.c +ffmpeg/libavcodec/rle.h +ffmpeg/libavcodec/rnd_avg.h +ffmpeg/libavcodec/roqaudioenc.c +ffmpeg/libavcodec/roqvideo.c +ffmpeg/libavcodec/roqvideo.h +ffmpeg/libavcodec/roqvideodec.c +ffmpeg/libavcodec/roqvideoenc.c +ffmpeg/libavcodec/rpza.c +ffmpeg/libavcodec/rtjpeg.c +ffmpeg/libavcodec/rtjpeg.h +ffmpeg/libavcodec/rv10.c +ffmpeg/libavcodec/rv10enc.c +ffmpeg/libavcodec/rv20enc.c +ffmpeg/libavcodec/rv30.c +ffmpeg/libavcodec/rv30data.h +ffmpeg/libavcodec/rv30dsp.c +ffmpeg/libavcodec/rv34.c +ffmpeg/libavcodec/rv34.h +ffmpeg/libavcodec/rv34_parser.c +ffmpeg/libavcodec/rv34data.h +ffmpeg/libavcodec/rv34dsp.c +ffmpeg/libavcodec/rv34dsp.h +ffmpeg/libavcodec/rv34vlc.h +ffmpeg/libavcodec/rv40.c +ffmpeg/libavcodec/rv40data.h +ffmpeg/libavcodec/rv40dsp.c +ffmpeg/libavcodec/rv40vlc2.h +ffmpeg/libavcodec/s302m.c +ffmpeg/libavcodec/s3tc.c +ffmpeg/libavcodec/s3tc.h +ffmpeg/libavcodec/samidec.c +ffmpeg/libavcodec/sanm.c +ffmpeg/libavcodec/sanm_data.h +ffmpeg/libavcodec/sbr.h +ffmpeg/libavcodec/sbrdsp.c +ffmpeg/libavcodec/sbrdsp.h +ffmpeg/libavcodec/sgi.h +ffmpeg/libavcodec/sgidec.c +ffmpeg/libavcodec/sgienc.c +ffmpeg/libavcodec/sgirledec.c +ffmpeg/libavcodec/sh4/dsputil_align.c +ffmpeg/libavcodec/sh4/dsputil_sh4.c +ffmpeg/libavcodec/sh4/dsputil_sh4.h +ffmpeg/libavcodec/sh4/h264chroma_init.c +ffmpeg/libavcodec/sh4/idct_sh4.c +ffmpeg/libavcodec/sh4/qpel.c +ffmpeg/libavcodec/sh4/sh4.h +ffmpeg/libavcodec/shorten.c +ffmpeg/libavcodec/simple_idct.c +ffmpeg/libavcodec/simple_idct.h +ffmpeg/libavcodec/simple_idct_template.c +ffmpeg/libavcodec/sinewin.c +ffmpeg/libavcodec/sinewin.h +ffmpeg/libavcodec/sinewin_tablegen.c +ffmpeg/libavcodec/sinewin_tablegen.h +ffmpeg/libavcodec/sipr.c +ffmpeg/libavcodec/sipr.h +ffmpeg/libavcodec/sipr16k.c +ffmpeg/libavcodec/sipr16kdata.h +ffmpeg/libavcodec/siprdata.h +ffmpeg/libavcodec/smacker.c +ffmpeg/libavcodec/smc.c +ffmpeg/libavcodec/snow.c +ffmpeg/libavcodec/snow.h +ffmpeg/libavcodec/snow_dwt.c +ffmpeg/libavcodec/snow_dwt.h +ffmpeg/libavcodec/snowdata.h +ffmpeg/libavcodec/snowdec.c +ffmpeg/libavcodec/snowenc.c +ffmpeg/libavcodec/sonic.c +ffmpeg/libavcodec/sp5x.h +ffmpeg/libavcodec/sp5xdec.c +ffmpeg/libavcodec/sparc/dsputil_vis.c +ffmpeg/libavcodec/sparc/dsputil_vis.h +ffmpeg/libavcodec/sparc/simple_idct_vis.c +ffmpeg/libavcodec/sparc/vis.h +ffmpeg/libavcodec/srtdec.c +ffmpeg/libavcodec/srtenc.c +ffmpeg/libavcodec/subviewerdec.c +ffmpeg/libavcodec/sunrast.c +ffmpeg/libavcodec/sunrast.h +ffmpeg/libavcodec/sunrastenc.c +ffmpeg/libavcodec/svq1.c +ffmpeg/libavcodec/svq1.h +ffmpeg/libavcodec/svq13.c +ffmpeg/libavcodec/svq1_cb.h +ffmpeg/libavcodec/svq1_vlc.h +ffmpeg/libavcodec/svq1dec.c +ffmpeg/libavcodec/svq1enc.c +ffmpeg/libavcodec/svq1enc_cb.h +ffmpeg/libavcodec/svq3.c +ffmpeg/libavcodec/svq3.h +ffmpeg/libavcodec/synth_filter.c +ffmpeg/libavcodec/synth_filter.h +ffmpeg/libavcodec/tableprint.h +ffmpeg/libavcodec/tak.c +ffmpeg/libavcodec/tak.h +ffmpeg/libavcodec/tak_parser.c +ffmpeg/libavcodec/takdec.c +ffmpeg/libavcodec/targa.c +ffmpeg/libavcodec/targa.h +ffmpeg/libavcodec/targa_y216dec.c +ffmpeg/libavcodec/targaenc.c +ffmpeg/libavcodec/textdec.c +ffmpeg/libavcodec/thread.h +ffmpeg/libavcodec/tiertexseqv.c +ffmpeg/libavcodec/tiff.c +ffmpeg/libavcodec/tiff.h +ffmpeg/libavcodec/tiff_data.c +ffmpeg/libavcodec/tiff_data.h +ffmpeg/libavcodec/tiffenc.c +ffmpeg/libavcodec/timecode.c +ffmpeg/libavcodec/timecode.h +ffmpeg/libavcodec/tmv.c +ffmpeg/libavcodec/truemotion1.c +ffmpeg/libavcodec/truemotion1data.h +ffmpeg/libavcodec/truemotion2.c +ffmpeg/libavcodec/truespeech.c +ffmpeg/libavcodec/truespeech_data.h +ffmpeg/libavcodec/tscc.c +ffmpeg/libavcodec/tscc2.c +ffmpeg/libavcodec/tscc2data.h +ffmpeg/libavcodec/tta.c +ffmpeg/libavcodec/twinvq.c +ffmpeg/libavcodec/twinvq_data.h +ffmpeg/libavcodec/txd.c +ffmpeg/libavcodec/ulti.c +ffmpeg/libavcodec/ulti_cb.h +ffmpeg/libavcodec/unary.h +ffmpeg/libavcodec/utils.c +ffmpeg/libavcodec/utvideo.c +ffmpeg/libavcodec/utvideo.h +ffmpeg/libavcodec/utvideodec.c +ffmpeg/libavcodec/utvideoenc.c +ffmpeg/libavcodec/v210dec.c +ffmpeg/libavcodec/v210dec.h +ffmpeg/libavcodec/v210enc.c +ffmpeg/libavcodec/v210x.c +ffmpeg/libavcodec/v308dec.c +ffmpeg/libavcodec/v308enc.c +ffmpeg/libavcodec/v408dec.c +ffmpeg/libavcodec/v408enc.c +ffmpeg/libavcodec/v410dec.c +ffmpeg/libavcodec/v410enc.c +ffmpeg/libavcodec/vaapi.c +ffmpeg/libavcodec/vaapi.h +ffmpeg/libavcodec/vaapi_h264.c +ffmpeg/libavcodec/vaapi_internal.h +ffmpeg/libavcodec/vaapi_mpeg2.c +ffmpeg/libavcodec/vaapi_mpeg4.c +ffmpeg/libavcodec/vaapi_vc1.c +ffmpeg/libavcodec/vb.c +ffmpeg/libavcodec/vble.c +ffmpeg/libavcodec/vc1.c +ffmpeg/libavcodec/vc1.h +ffmpeg/libavcodec/vc1_parser.c +ffmpeg/libavcodec/vc1acdata.h +ffmpeg/libavcodec/vc1data.c +ffmpeg/libavcodec/vc1data.h +ffmpeg/libavcodec/vc1dec.c +ffmpeg/libavcodec/vc1dsp.c +ffmpeg/libavcodec/vc1dsp.h +ffmpeg/libavcodec/vcr1.c +ffmpeg/libavcodec/vda.h +ffmpeg/libavcodec/vda_h264.c +ffmpeg/libavcodec/vda_h264_dec.c +ffmpeg/libavcodec/vdpau.c +ffmpeg/libavcodec/vdpau.h +ffmpeg/libavcodec/vdpau_h264.c +ffmpeg/libavcodec/vdpau_internal.h +ffmpeg/libavcodec/vdpau_mpeg12.c +ffmpeg/libavcodec/vdpau_mpeg4.c +ffmpeg/libavcodec/vdpau_vc1.c +ffmpeg/libavcodec/version.h +ffmpeg/libavcodec/videodsp.c +ffmpeg/libavcodec/videodsp.h +ffmpeg/libavcodec/videodsp_template.c +ffmpeg/libavcodec/vima.c +ffmpeg/libavcodec/vmdav.c +ffmpeg/libavcodec/vmnc.c +ffmpeg/libavcodec/vorbis.c +ffmpeg/libavcodec/vorbis.h +ffmpeg/libavcodec/vorbis_data.c +ffmpeg/libavcodec/vorbis_enc_data.h +ffmpeg/libavcodec/vorbis_parser.c +ffmpeg/libavcodec/vorbis_parser.h +ffmpeg/libavcodec/vorbisdec.c +ffmpeg/libavcodec/vorbisdsp.c +ffmpeg/libavcodec/vorbisdsp.h +ffmpeg/libavcodec/vorbisenc.c +ffmpeg/libavcodec/vp3.c +ffmpeg/libavcodec/vp3_parser.c +ffmpeg/libavcodec/vp3data.h +ffmpeg/libavcodec/vp3dsp.c +ffmpeg/libavcodec/vp3dsp.h +ffmpeg/libavcodec/vp5.c +ffmpeg/libavcodec/vp56.c +ffmpeg/libavcodec/vp56.h +ffmpeg/libavcodec/vp56data.c +ffmpeg/libavcodec/vp56data.h +ffmpeg/libavcodec/vp56dsp.c +ffmpeg/libavcodec/vp56dsp.h +ffmpeg/libavcodec/vp56rac.c +ffmpeg/libavcodec/vp5data.h +ffmpeg/libavcodec/vp6.c +ffmpeg/libavcodec/vp6data.h +ffmpeg/libavcodec/vp6dsp.c +ffmpeg/libavcodec/vp8.c +ffmpeg/libavcodec/vp8.h +ffmpeg/libavcodec/vp8_parser.c +ffmpeg/libavcodec/vp8data.h +ffmpeg/libavcodec/vp8dsp.c +ffmpeg/libavcodec/vp8dsp.h +ffmpeg/libavcodec/vqavideo.c +ffmpeg/libavcodec/w32pthreads.h +ffmpeg/libavcodec/wavpack.c +ffmpeg/libavcodec/webvttdec.c +ffmpeg/libavcodec/wma.c +ffmpeg/libavcodec/wma.h +ffmpeg/libavcodec/wma_common.c +ffmpeg/libavcodec/wma_common.h +ffmpeg/libavcodec/wmadata.h +ffmpeg/libavcodec/wmadec.c +ffmpeg/libavcodec/wmaenc.c +ffmpeg/libavcodec/wmalosslessdec.c +ffmpeg/libavcodec/wmaprodata.h +ffmpeg/libavcodec/wmaprodec.c +ffmpeg/libavcodec/wmavoice.c +ffmpeg/libavcodec/wmavoice_data.h +ffmpeg/libavcodec/wmv2.c +ffmpeg/libavcodec/wmv2.h +ffmpeg/libavcodec/wmv2dec.c +ffmpeg/libavcodec/wmv2dsp.c +ffmpeg/libavcodec/wmv2dsp.h +ffmpeg/libavcodec/wmv2enc.c +ffmpeg/libavcodec/wnv1.c +ffmpeg/libavcodec/ws-snd1.c +ffmpeg/libavcodec/x86/ac3dsp.asm +ffmpeg/libavcodec/x86/ac3dsp_init.c +ffmpeg/libavcodec/x86/cabac.h +ffmpeg/libavcodec/x86/cavsdsp.c +ffmpeg/libavcodec/x86/dct32.asm +ffmpeg/libavcodec/x86/deinterlace.asm +ffmpeg/libavcodec/x86/dirac_dwt.c +ffmpeg/libavcodec/x86/dirac_dwt.h +ffmpeg/libavcodec/x86/diracdsp_mmx.c +ffmpeg/libavcodec/x86/diracdsp_mmx.h +ffmpeg/libavcodec/x86/diracdsp_yasm.asm +ffmpeg/libavcodec/x86/dnxhdenc.c +ffmpeg/libavcodec/x86/dsputil.asm +ffmpeg/libavcodec/x86/dsputil_avg_template.c +ffmpeg/libavcodec/x86/dsputil_mmx.c +ffmpeg/libavcodec/x86/dsputil_mmx.h +ffmpeg/libavcodec/x86/dsputil_qns_template.c +ffmpeg/libavcodec/x86/dsputil_rnd_template.c +ffmpeg/libavcodec/x86/dsputilenc.asm +ffmpeg/libavcodec/x86/dsputilenc_mmx.c +ffmpeg/libavcodec/x86/dwt_yasm.asm +ffmpeg/libavcodec/x86/fdct.c +ffmpeg/libavcodec/x86/fft.asm +ffmpeg/libavcodec/x86/fft.h +ffmpeg/libavcodec/x86/fft_init.c +ffmpeg/libavcodec/x86/fmtconvert.asm +ffmpeg/libavcodec/x86/fmtconvert_init.c +ffmpeg/libavcodec/x86/h263_loopfilter.asm +ffmpeg/libavcodec/x86/h264_chromamc.asm +ffmpeg/libavcodec/x86/h264_chromamc_10bit.asm +ffmpeg/libavcodec/x86/h264_deblock.asm +ffmpeg/libavcodec/x86/h264_deblock_10bit.asm +ffmpeg/libavcodec/x86/h264_i386.h +ffmpeg/libavcodec/x86/h264_idct.asm +ffmpeg/libavcodec/x86/h264_idct_10bit.asm +ffmpeg/libavcodec/x86/h264_intrapred.asm +ffmpeg/libavcodec/x86/h264_intrapred_10bit.asm +ffmpeg/libavcodec/x86/h264_intrapred_init.c +ffmpeg/libavcodec/x86/h264_qpel.c +ffmpeg/libavcodec/x86/h264_qpel_10bit.asm +ffmpeg/libavcodec/x86/h264_qpel_8bit.asm +ffmpeg/libavcodec/x86/h264_weight.asm +ffmpeg/libavcodec/x86/h264_weight_10bit.asm +ffmpeg/libavcodec/x86/h264chroma_init.c +ffmpeg/libavcodec/x86/h264dsp_init.c +ffmpeg/libavcodec/x86/hpeldsp.asm +ffmpeg/libavcodec/x86/idct_mmx.c +ffmpeg/libavcodec/x86/idct_mmx_xvid.c +ffmpeg/libavcodec/x86/idct_sse2_xvid.c +ffmpeg/libavcodec/x86/idct_xvid.h +ffmpeg/libavcodec/x86/imdct36.asm +ffmpeg/libavcodec/x86/lpc.c +ffmpeg/libavcodec/x86/mathops.h +ffmpeg/libavcodec/x86/mlpdsp.c +ffmpeg/libavcodec/x86/motion_est.c +ffmpeg/libavcodec/x86/mpeg4qpel.asm +ffmpeg/libavcodec/x86/mpegaudiodec.c +ffmpeg/libavcodec/x86/mpegvideo.c +ffmpeg/libavcodec/x86/mpegvideoenc.c +ffmpeg/libavcodec/x86/mpegvideoenc_template.c +ffmpeg/libavcodec/x86/pngdsp.asm +ffmpeg/libavcodec/x86/pngdsp_init.c +ffmpeg/libavcodec/x86/proresdsp.asm +ffmpeg/libavcodec/x86/proresdsp_init.c +ffmpeg/libavcodec/x86/rv34dsp.asm +ffmpeg/libavcodec/x86/rv34dsp_init.c +ffmpeg/libavcodec/x86/rv40dsp.asm +ffmpeg/libavcodec/x86/rv40dsp_init.c +ffmpeg/libavcodec/x86/sbrdsp.asm +ffmpeg/libavcodec/x86/sbrdsp_init.c +ffmpeg/libavcodec/x86/simple_idct.c +ffmpeg/libavcodec/x86/snowdsp.c +ffmpeg/libavcodec/x86/v210-init.c +ffmpeg/libavcodec/x86/v210.asm +ffmpeg/libavcodec/x86/vc1dsp.asm +ffmpeg/libavcodec/x86/vc1dsp.h +ffmpeg/libavcodec/x86/vc1dsp_init.c +ffmpeg/libavcodec/x86/vc1dsp_mmx.c +ffmpeg/libavcodec/x86/videodsp.asm +ffmpeg/libavcodec/x86/videodsp_init.c +ffmpeg/libavcodec/x86/vorbisdsp.asm +ffmpeg/libavcodec/x86/vorbisdsp_init.c +ffmpeg/libavcodec/x86/vp3dsp.asm +ffmpeg/libavcodec/x86/vp3dsp_init.c +ffmpeg/libavcodec/x86/vp56_arith.h +ffmpeg/libavcodec/x86/vp56dsp.asm +ffmpeg/libavcodec/x86/vp56dsp_init.c +ffmpeg/libavcodec/x86/vp8dsp.asm +ffmpeg/libavcodec/x86/vp8dsp_init.c +ffmpeg/libavcodec/x86/w64xmmtest.c +ffmpeg/libavcodec/xan.c +ffmpeg/libavcodec/xbmdec.c +ffmpeg/libavcodec/xbmenc.c +ffmpeg/libavcodec/xface.c +ffmpeg/libavcodec/xface.h +ffmpeg/libavcodec/xfacedec.c +ffmpeg/libavcodec/xfaceenc.c +ffmpeg/libavcodec/xiph.c +ffmpeg/libavcodec/xiph.h +ffmpeg/libavcodec/xl.c +ffmpeg/libavcodec/xsubdec.c +ffmpeg/libavcodec/xsubenc.c +ffmpeg/libavcodec/xvmc.h +ffmpeg/libavcodec/xvmc_internal.h +ffmpeg/libavcodec/xwd.h +ffmpeg/libavcodec/xwddec.c +ffmpeg/libavcodec/xwdenc.c +ffmpeg/libavcodec/xxan.c +ffmpeg/libavcodec/y41pdec.c +ffmpeg/libavcodec/y41penc.c +ffmpeg/libavcodec/yop.c +ffmpeg/libavcodec/yuv4dec.c +ffmpeg/libavcodec/yuv4enc.c +ffmpeg/libavcodec/zerocodec.c +ffmpeg/libavcodec/zmbv.c +ffmpeg/libavcodec/zmbvenc.c +ffmpeg/libavdevice/alldevices.c +ffmpeg/libavdevice/alsa-audio-common.c +ffmpeg/libavdevice/alsa-audio-dec.c +ffmpeg/libavdevice/alsa-audio-enc.c +ffmpeg/libavdevice/alsa-audio.h +ffmpeg/libavdevice/avdevice.c +ffmpeg/libavdevice/avdevice.h +ffmpeg/libavdevice/bktr.c +ffmpeg/libavdevice/caca.c +ffmpeg/libavdevice/dshow.c +ffmpeg/libavdevice/dshow_capture.h +ffmpeg/libavdevice/dshow_common.c +ffmpeg/libavdevice/dshow_enummediatypes.c +ffmpeg/libavdevice/dshow_enumpins.c +ffmpeg/libavdevice/dshow_filter.c +ffmpeg/libavdevice/dshow_pin.c +ffmpeg/libavdevice/dv1394.c +ffmpeg/libavdevice/dv1394.h +ffmpeg/libavdevice/fbdev.c +ffmpeg/libavdevice/iec61883.c +ffmpeg/libavdevice/jack_audio.c +ffmpeg/libavdevice/lavfi.c +ffmpeg/libavdevice/libavdevice.v +ffmpeg/libavdevice/libcdio.c +ffmpeg/libavdevice/libdc1394.c +ffmpeg/libavdevice/openal-dec.c +ffmpeg/libavdevice/oss_audio.c +ffmpeg/libavdevice/pulse.c +ffmpeg/libavdevice/sdl.c +ffmpeg/libavdevice/sndio_common.c +ffmpeg/libavdevice/sndio_common.h +ffmpeg/libavdevice/sndio_dec.c +ffmpeg/libavdevice/sndio_enc.c +ffmpeg/libavdevice/timefilter.c +ffmpeg/libavdevice/timefilter.h +ffmpeg/libavdevice/v4l.c +ffmpeg/libavdevice/v4l2.c +ffmpeg/libavdevice/version.h +ffmpeg/libavdevice/vfwcap.c +ffmpeg/libavdevice/x11grab.c +ffmpeg/libavfilter/af_aconvert.c +ffmpeg/libavfilter/af_afade.c +ffmpeg/libavfilter/af_aformat.c +ffmpeg/libavfilter/af_amerge.c +ffmpeg/libavfilter/af_amix.c +ffmpeg/libavfilter/af_anull.c +ffmpeg/libavfilter/af_apad.c +ffmpeg/libavfilter/af_aresample.c +ffmpeg/libavfilter/af_asetnsamples.c +ffmpeg/libavfilter/af_ashowinfo.c +ffmpeg/libavfilter/af_astreamsync.c +ffmpeg/libavfilter/af_asyncts.c +ffmpeg/libavfilter/af_atempo.c +ffmpeg/libavfilter/af_biquads.c +ffmpeg/libavfilter/af_channelmap.c +ffmpeg/libavfilter/af_channelsplit.c +ffmpeg/libavfilter/af_earwax.c +ffmpeg/libavfilter/af_join.c +ffmpeg/libavfilter/af_pan.c +ffmpeg/libavfilter/af_resample.c +ffmpeg/libavfilter/af_silencedetect.c +ffmpeg/libavfilter/af_volume.c +ffmpeg/libavfilter/af_volume.h +ffmpeg/libavfilter/af_volumedetect.c +ffmpeg/libavfilter/all_channel_layouts.inc +ffmpeg/libavfilter/allfilters.c +ffmpeg/libavfilter/asink_anullsink.c +ffmpeg/libavfilter/asrc_abuffer.h +ffmpeg/libavfilter/asrc_aevalsrc.c +ffmpeg/libavfilter/asrc_anullsrc.c +ffmpeg/libavfilter/asrc_flite.c +ffmpeg/libavfilter/audio.c +ffmpeg/libavfilter/audio.h +ffmpeg/libavfilter/avcodec.c +ffmpeg/libavfilter/avcodec.h +ffmpeg/libavfilter/avf_concat.c +ffmpeg/libavfilter/avf_showspectrum.c +ffmpeg/libavfilter/avf_showwaves.c +ffmpeg/libavfilter/avfilter.c +ffmpeg/libavfilter/avfilter.h +ffmpeg/libavfilter/avfiltergraph.c +ffmpeg/libavfilter/avfiltergraph.h +ffmpeg/libavfilter/bbox.c +ffmpeg/libavfilter/bbox.h +ffmpeg/libavfilter/buffer.c +ffmpeg/libavfilter/bufferqueue.h +ffmpeg/libavfilter/buffersink.c +ffmpeg/libavfilter/buffersink.h +ffmpeg/libavfilter/buffersrc.c +ffmpeg/libavfilter/buffersrc.h +ffmpeg/libavfilter/drawutils.c +ffmpeg/libavfilter/drawutils.h +ffmpeg/libavfilter/f_ebur128.c +ffmpeg/libavfilter/f_select.c +ffmpeg/libavfilter/f_sendcmd.c +ffmpeg/libavfilter/f_setpts.c +ffmpeg/libavfilter/f_settb.c +ffmpeg/libavfilter/fifo.c +ffmpeg/libavfilter/filtfmts.c +ffmpeg/libavfilter/formats.c +ffmpeg/libavfilter/formats.h +ffmpeg/libavfilter/gradfun.h +ffmpeg/libavfilter/graphdump.c +ffmpeg/libavfilter/graphparser.c +ffmpeg/libavfilter/internal.h +ffmpeg/libavfilter/lavfutils.c +ffmpeg/libavfilter/lavfutils.h +ffmpeg/libavfilter/libavfilter.v +ffmpeg/libavfilter/libmpcodecs/av_helpers.h +ffmpeg/libavfilter/libmpcodecs/cpudetect.h +ffmpeg/libavfilter/libmpcodecs/help_mp.h +ffmpeg/libavfilter/libmpcodecs/img_format.c +ffmpeg/libavfilter/libmpcodecs/img_format.h +ffmpeg/libavfilter/libmpcodecs/libvo/fastmemcpy.h +ffmpeg/libavfilter/libmpcodecs/libvo/video_out.h +ffmpeg/libavfilter/libmpcodecs/mp_image.c +ffmpeg/libavfilter/libmpcodecs/mp_image.h +ffmpeg/libavfilter/libmpcodecs/mp_msg.h +ffmpeg/libavfilter/libmpcodecs/mpbswap.h +ffmpeg/libavfilter/libmpcodecs/mpc_info.h +ffmpeg/libavfilter/libmpcodecs/pullup.c +ffmpeg/libavfilter/libmpcodecs/pullup.h +ffmpeg/libavfilter/libmpcodecs/vf.h +ffmpeg/libavfilter/libmpcodecs/vf_detc.c +ffmpeg/libavfilter/libmpcodecs/vf_dint.c +ffmpeg/libavfilter/libmpcodecs/vf_divtc.c +ffmpeg/libavfilter/libmpcodecs/vf_down3dright.c +ffmpeg/libavfilter/libmpcodecs/vf_eq.c +ffmpeg/libavfilter/libmpcodecs/vf_eq2.c +ffmpeg/libavfilter/libmpcodecs/vf_fil.c +ffmpeg/libavfilter/libmpcodecs/vf_filmdint.c +ffmpeg/libavfilter/libmpcodecs/vf_fspp.c +ffmpeg/libavfilter/libmpcodecs/vf_harddup.c +ffmpeg/libavfilter/libmpcodecs/vf_ilpack.c +ffmpeg/libavfilter/libmpcodecs/vf_ivtc.c +ffmpeg/libavfilter/libmpcodecs/vf_mcdeint.c +ffmpeg/libavfilter/libmpcodecs/vf_noise.c +ffmpeg/libavfilter/libmpcodecs/vf_ow.c +ffmpeg/libavfilter/libmpcodecs/vf_perspective.c +ffmpeg/libavfilter/libmpcodecs/vf_phase.c +ffmpeg/libavfilter/libmpcodecs/vf_pp7.c +ffmpeg/libavfilter/libmpcodecs/vf_pullup.c +ffmpeg/libavfilter/libmpcodecs/vf_qp.c +ffmpeg/libavfilter/libmpcodecs/vf_sab.c +ffmpeg/libavfilter/libmpcodecs/vf_scale.h +ffmpeg/libavfilter/libmpcodecs/vf_softpulldown.c +ffmpeg/libavfilter/libmpcodecs/vf_spp.c +ffmpeg/libavfilter/libmpcodecs/vf_telecine.c +ffmpeg/libavfilter/libmpcodecs/vf_tinterlace.c +ffmpeg/libavfilter/libmpcodecs/vf_uspp.c +ffmpeg/libavfilter/libmpcodecs/vfcap.h +ffmpeg/libavfilter/lswsutils.c +ffmpeg/libavfilter/lswsutils.h +ffmpeg/libavfilter/sink_buffer.c +ffmpeg/libavfilter/split.c +ffmpeg/libavfilter/src_buffer.c +ffmpeg/libavfilter/src_movie.c +ffmpeg/libavfilter/transform.c +ffmpeg/libavfilter/transform.h +ffmpeg/libavfilter/version.h +ffmpeg/libavfilter/vf_alphaextract.c +ffmpeg/libavfilter/vf_alphamerge.c +ffmpeg/libavfilter/vf_aspect.c +ffmpeg/libavfilter/vf_bbox.c +ffmpeg/libavfilter/vf_blackdetect.c +ffmpeg/libavfilter/vf_blackframe.c +ffmpeg/libavfilter/vf_blend.c +ffmpeg/libavfilter/vf_boxblur.c +ffmpeg/libavfilter/vf_colormatrix.c +ffmpeg/libavfilter/vf_copy.c +ffmpeg/libavfilter/vf_crop.c +ffmpeg/libavfilter/vf_cropdetect.c +ffmpeg/libavfilter/vf_decimate.c +ffmpeg/libavfilter/vf_delogo.c +ffmpeg/libavfilter/vf_deshake.c +ffmpeg/libavfilter/vf_drawbox.c +ffmpeg/libavfilter/vf_drawtext.c +ffmpeg/libavfilter/vf_edgedetect.c +ffmpeg/libavfilter/vf_fade.c +ffmpeg/libavfilter/vf_field.c +ffmpeg/libavfilter/vf_fieldorder.c +ffmpeg/libavfilter/vf_format.c +ffmpeg/libavfilter/vf_fps.c +ffmpeg/libavfilter/vf_framestep.c +ffmpeg/libavfilter/vf_frei0r.c +ffmpeg/libavfilter/vf_geq.c +ffmpeg/libavfilter/vf_gradfun.c +ffmpeg/libavfilter/vf_hflip.c +ffmpeg/libavfilter/vf_histeq.c +ffmpeg/libavfilter/vf_histogram.c +ffmpeg/libavfilter/vf_hqdn3d.c +ffmpeg/libavfilter/vf_hqdn3d.h +ffmpeg/libavfilter/vf_hue.c +ffmpeg/libavfilter/vf_idet.c +ffmpeg/libavfilter/vf_il.c +ffmpeg/libavfilter/vf_kerndeint.c +ffmpeg/libavfilter/vf_libopencv.c +ffmpeg/libavfilter/vf_lut.c +ffmpeg/libavfilter/vf_mp.c +ffmpeg/libavfilter/vf_noise.c +ffmpeg/libavfilter/vf_null.c +ffmpeg/libavfilter/vf_overlay.c +ffmpeg/libavfilter/vf_pad.c +ffmpeg/libavfilter/vf_pixdesctest.c +ffmpeg/libavfilter/vf_pp.c +ffmpeg/libavfilter/vf_removelogo.c +ffmpeg/libavfilter/vf_scale.c +ffmpeg/libavfilter/vf_setfield.c +ffmpeg/libavfilter/vf_showinfo.c +ffmpeg/libavfilter/vf_smartblur.c +ffmpeg/libavfilter/vf_stereo3d.c +ffmpeg/libavfilter/vf_subtitles.c +ffmpeg/libavfilter/vf_super2xsai.c +ffmpeg/libavfilter/vf_swapuv.c +ffmpeg/libavfilter/vf_thumbnail.c +ffmpeg/libavfilter/vf_tile.c +ffmpeg/libavfilter/vf_tinterlace.c +ffmpeg/libavfilter/vf_transpose.c +ffmpeg/libavfilter/vf_unsharp.c +ffmpeg/libavfilter/vf_vflip.c +ffmpeg/libavfilter/vf_yadif.c +ffmpeg/libavfilter/video.c +ffmpeg/libavfilter/video.h +ffmpeg/libavfilter/vsink_nullsink.c +ffmpeg/libavfilter/vsrc_cellauto.c +ffmpeg/libavfilter/vsrc_life.c +ffmpeg/libavfilter/vsrc_mandelbrot.c +ffmpeg/libavfilter/vsrc_mptestsrc.c +ffmpeg/libavfilter/vsrc_testsrc.c +ffmpeg/libavfilter/x86/af_volume.asm +ffmpeg/libavfilter/x86/af_volume_init.c +ffmpeg/libavfilter/x86/vf_gradfun.c +ffmpeg/libavfilter/x86/vf_hqdn3d.asm +ffmpeg/libavfilter/x86/vf_hqdn3d_init.c +ffmpeg/libavfilter/x86/vf_yadif.asm +ffmpeg/libavfilter/x86/vf_yadif_init.c +ffmpeg/libavfilter/yadif.h +ffmpeg/libavformat/4xm.c +ffmpeg/libavformat/a64.c +ffmpeg/libavformat/aacdec.c +ffmpeg/libavformat/ac3dec.c +ffmpeg/libavformat/act.c +ffmpeg/libavformat/adtsenc.c +ffmpeg/libavformat/adxdec.c +ffmpeg/libavformat/aea.c +ffmpeg/libavformat/afc.c +ffmpeg/libavformat/aiff.h +ffmpeg/libavformat/aiffdec.c +ffmpeg/libavformat/aiffenc.c +ffmpeg/libavformat/allformats.c +ffmpeg/libavformat/amr.c +ffmpeg/libavformat/anm.c +ffmpeg/libavformat/apc.c +ffmpeg/libavformat/ape.c +ffmpeg/libavformat/apetag.c +ffmpeg/libavformat/apetag.h +ffmpeg/libavformat/apetagenc.c +ffmpeg/libavformat/aqtitledec.c +ffmpeg/libavformat/asf.c +ffmpeg/libavformat/asf.h +ffmpeg/libavformat/asfcrypt.c +ffmpeg/libavformat/asfcrypt.h +ffmpeg/libavformat/asfdec.c +ffmpeg/libavformat/asfenc.c +ffmpeg/libavformat/assdec.c +ffmpeg/libavformat/assenc.c +ffmpeg/libavformat/ast.c +ffmpeg/libavformat/ast.h +ffmpeg/libavformat/astdec.c +ffmpeg/libavformat/astenc.c +ffmpeg/libavformat/au.c +ffmpeg/libavformat/audiointerleave.c +ffmpeg/libavformat/audiointerleave.h +ffmpeg/libavformat/avc.c +ffmpeg/libavformat/avc.h +ffmpeg/libavformat/avformat.h +ffmpeg/libavformat/avi.h +ffmpeg/libavformat/avidec.c +ffmpeg/libavformat/avienc.c +ffmpeg/libavformat/avio.c +ffmpeg/libavformat/avio.h +ffmpeg/libavformat/avio_internal.h +ffmpeg/libavformat/aviobuf.c +ffmpeg/libavformat/avisynth.c +ffmpeg/libavformat/avlanguage.c +ffmpeg/libavformat/avlanguage.h +ffmpeg/libavformat/avr.c +ffmpeg/libavformat/avs.c +ffmpeg/libavformat/bethsoftvid.c +ffmpeg/libavformat/bfi.c +ffmpeg/libavformat/bink.c +ffmpeg/libavformat/bintext.c +ffmpeg/libavformat/bit.c +ffmpeg/libavformat/bluray.c +ffmpeg/libavformat/bmv.c +ffmpeg/libavformat/brstm.c +ffmpeg/libavformat/c93.c +ffmpeg/libavformat/cache.c +ffmpeg/libavformat/caf.c +ffmpeg/libavformat/caf.h +ffmpeg/libavformat/cafdec.c +ffmpeg/libavformat/cafenc.c +ffmpeg/libavformat/cavsvideodec.c +ffmpeg/libavformat/cdg.c +ffmpeg/libavformat/cdxl.c +ffmpeg/libavformat/concat.c +ffmpeg/libavformat/concatdec.c +ffmpeg/libavformat/crcenc.c +ffmpeg/libavformat/crypto.c +ffmpeg/libavformat/cutils.c +ffmpeg/libavformat/data_uri.c +ffmpeg/libavformat/daud.c +ffmpeg/libavformat/dfa.c +ffmpeg/libavformat/diracdec.c +ffmpeg/libavformat/dnxhddec.c +ffmpeg/libavformat/dsicin.c +ffmpeg/libavformat/dtsdec.c +ffmpeg/libavformat/dtshddec.c +ffmpeg/libavformat/dv.c +ffmpeg/libavformat/dv.h +ffmpeg/libavformat/dvenc.c +ffmpeg/libavformat/dxa.c +ffmpeg/libavformat/eacdata.c +ffmpeg/libavformat/electronicarts.c +ffmpeg/libavformat/epafdec.c +ffmpeg/libavformat/ffm.h +ffmpeg/libavformat/ffmdec.c +ffmpeg/libavformat/ffmenc.c +ffmpeg/libavformat/ffmeta.h +ffmpeg/libavformat/ffmetadec.c +ffmpeg/libavformat/ffmetaenc.c +ffmpeg/libavformat/file.c +ffmpeg/libavformat/filmstripdec.c +ffmpeg/libavformat/filmstripenc.c +ffmpeg/libavformat/flacdec.c +ffmpeg/libavformat/flacenc.c +ffmpeg/libavformat/flacenc.h +ffmpeg/libavformat/flacenc_header.c +ffmpeg/libavformat/flic.c +ffmpeg/libavformat/flv.h +ffmpeg/libavformat/flvdec.c +ffmpeg/libavformat/flvenc.c +ffmpeg/libavformat/framecrcenc.c +ffmpeg/libavformat/framehash.c +ffmpeg/libavformat/frmdec.c +ffmpeg/libavformat/g722.c +ffmpeg/libavformat/g723_1.c +ffmpeg/libavformat/g729dec.c +ffmpeg/libavformat/gif.c +ffmpeg/libavformat/gifdec.c +ffmpeg/libavformat/gopher.c +ffmpeg/libavformat/gsmdec.c +ffmpeg/libavformat/gxf.c +ffmpeg/libavformat/gxf.h +ffmpeg/libavformat/gxfenc.c +ffmpeg/libavformat/h261dec.c +ffmpeg/libavformat/h263dec.c +ffmpeg/libavformat/h264dec.c +ffmpeg/libavformat/hls.c +ffmpeg/libavformat/hlsenc.c +ffmpeg/libavformat/hlsproto.c +ffmpeg/libavformat/http.c +ffmpeg/libavformat/http.h +ffmpeg/libavformat/httpauth.c +ffmpeg/libavformat/httpauth.h +ffmpeg/libavformat/icodec.c +ffmpeg/libavformat/icoenc.c +ffmpeg/libavformat/id3v1.c +ffmpeg/libavformat/id3v1.h +ffmpeg/libavformat/id3v2.c +ffmpeg/libavformat/id3v2.h +ffmpeg/libavformat/id3v2enc.c +ffmpeg/libavformat/idcin.c +ffmpeg/libavformat/idroqdec.c +ffmpeg/libavformat/idroqenc.c +ffmpeg/libavformat/iff.c +ffmpeg/libavformat/ilbc.c +ffmpeg/libavformat/img2.c +ffmpeg/libavformat/img2dec.c +ffmpeg/libavformat/img2enc.c +ffmpeg/libavformat/ingenientdec.c +ffmpeg/libavformat/internal.h +ffmpeg/libavformat/ipmovie.c +ffmpeg/libavformat/ircam.c +ffmpeg/libavformat/ircam.h +ffmpeg/libavformat/ircamdec.c +ffmpeg/libavformat/ircamenc.c +ffmpeg/libavformat/isom.c +ffmpeg/libavformat/isom.h +ffmpeg/libavformat/iss.c +ffmpeg/libavformat/iv8.c +ffmpeg/libavformat/ivfdec.c +ffmpeg/libavformat/ivfenc.c +ffmpeg/libavformat/jacosubdec.c +ffmpeg/libavformat/jacosubenc.c +ffmpeg/libavformat/jvdec.c +ffmpeg/libavformat/latmenc.c +ffmpeg/libavformat/libavformat.v +ffmpeg/libavformat/libmodplug.c +ffmpeg/libavformat/libnut.c +ffmpeg/libavformat/librtmp.c +ffmpeg/libavformat/lmlm4.c +ffmpeg/libavformat/loasdec.c +ffmpeg/libavformat/log2_tab.c +ffmpeg/libavformat/lvfdec.c +ffmpeg/libavformat/lxfdec.c +ffmpeg/libavformat/m4vdec.c +ffmpeg/libavformat/matroska.c +ffmpeg/libavformat/matroska.h +ffmpeg/libavformat/matroskadec.c +ffmpeg/libavformat/matroskaenc.c +ffmpeg/libavformat/md5enc.c +ffmpeg/libavformat/md5proto.c +ffmpeg/libavformat/metadata.c +ffmpeg/libavformat/metadata.h +ffmpeg/libavformat/mgsts.c +ffmpeg/libavformat/microdvddec.c +ffmpeg/libavformat/microdvdenc.c +ffmpeg/libavformat/mkvtimestamp_v2.c +ffmpeg/libavformat/mm.c +ffmpeg/libavformat/mmf.c +ffmpeg/libavformat/mms.c +ffmpeg/libavformat/mms.h +ffmpeg/libavformat/mmsh.c +ffmpeg/libavformat/mmst.c +ffmpeg/libavformat/mov.c +ffmpeg/libavformat/mov_chan.c +ffmpeg/libavformat/mov_chan.h +ffmpeg/libavformat/movenc.c +ffmpeg/libavformat/movenc.h +ffmpeg/libavformat/movenchint.c +ffmpeg/libavformat/mp3dec.c +ffmpeg/libavformat/mp3enc.c +ffmpeg/libavformat/mpc.c +ffmpeg/libavformat/mpc8.c +ffmpeg/libavformat/mpeg.c +ffmpeg/libavformat/mpeg.h +ffmpeg/libavformat/mpegenc.c +ffmpeg/libavformat/mpegts.c +ffmpeg/libavformat/mpegts.h +ffmpeg/libavformat/mpegtsenc.c +ffmpeg/libavformat/mpegvideodec.c +ffmpeg/libavformat/mpjpeg.c +ffmpeg/libavformat/mpl2dec.c +ffmpeg/libavformat/mpsubdec.c +ffmpeg/libavformat/msnwc_tcp.c +ffmpeg/libavformat/mtv.c +ffmpeg/libavformat/mux.c +ffmpeg/libavformat/mvdec.c +ffmpeg/libavformat/mvi.c +ffmpeg/libavformat/mxf.c +ffmpeg/libavformat/mxf.h +ffmpeg/libavformat/mxfdec.c +ffmpeg/libavformat/mxfenc.c +ffmpeg/libavformat/mxg.c +ffmpeg/libavformat/ncdec.c +ffmpeg/libavformat/network.c +ffmpeg/libavformat/network.h +ffmpeg/libavformat/nistspheredec.c +ffmpeg/libavformat/noproxy-test.c +ffmpeg/libavformat/nsvdec.c +ffmpeg/libavformat/nullenc.c +ffmpeg/libavformat/nut.c +ffmpeg/libavformat/nut.h +ffmpeg/libavformat/nutdec.c +ffmpeg/libavformat/nutenc.c +ffmpeg/libavformat/nuv.c +ffmpeg/libavformat/oggdec.c +ffmpeg/libavformat/oggdec.h +ffmpeg/libavformat/oggenc.c +ffmpeg/libavformat/oggparsecelt.c +ffmpeg/libavformat/oggparsedirac.c +ffmpeg/libavformat/oggparseflac.c +ffmpeg/libavformat/oggparseogm.c +ffmpeg/libavformat/oggparseopus.c +ffmpeg/libavformat/oggparseskeleton.c +ffmpeg/libavformat/oggparsespeex.c +ffmpeg/libavformat/oggparsetheora.c +ffmpeg/libavformat/oggparsevorbis.c +ffmpeg/libavformat/oma.c +ffmpeg/libavformat/oma.h +ffmpeg/libavformat/omadec.c +ffmpeg/libavformat/omaenc.c +ffmpeg/libavformat/options.c +ffmpeg/libavformat/options_table.h +ffmpeg/libavformat/os_support.c +ffmpeg/libavformat/os_support.h +ffmpeg/libavformat/paf.c +ffmpeg/libavformat/pcm.c +ffmpeg/libavformat/pcm.h +ffmpeg/libavformat/pcmdec.c +ffmpeg/libavformat/pcmenc.c +ffmpeg/libavformat/pjsdec.c +ffmpeg/libavformat/pmpdec.c +ffmpeg/libavformat/psxstr.c +ffmpeg/libavformat/pva.c +ffmpeg/libavformat/pvfdec.c +ffmpeg/libavformat/qcp.c +ffmpeg/libavformat/qtpalette.h +ffmpeg/libavformat/r3d.c +ffmpeg/libavformat/rawdec.c +ffmpeg/libavformat/rawdec.h +ffmpeg/libavformat/rawenc.c +ffmpeg/libavformat/rawenc.h +ffmpeg/libavformat/rawvideodec.c +ffmpeg/libavformat/rdt.c +ffmpeg/libavformat/rdt.h +ffmpeg/libavformat/realtextdec.c +ffmpeg/libavformat/riff.c +ffmpeg/libavformat/riff.h +ffmpeg/libavformat/rl2.c +ffmpeg/libavformat/rm.c +ffmpeg/libavformat/rm.h +ffmpeg/libavformat/rmdec.c +ffmpeg/libavformat/rmenc.c +ffmpeg/libavformat/rmsipr.c +ffmpeg/libavformat/rmsipr.h +ffmpeg/libavformat/rpl.c +ffmpeg/libavformat/rso.c +ffmpeg/libavformat/rso.h +ffmpeg/libavformat/rsodec.c +ffmpeg/libavformat/rsoenc.c +ffmpeg/libavformat/rtmp.h +ffmpeg/libavformat/rtmpcrypt.c +ffmpeg/libavformat/rtmpcrypt.h +ffmpeg/libavformat/rtmpdh.c +ffmpeg/libavformat/rtmpdh.h +ffmpeg/libavformat/rtmphttp.c +ffmpeg/libavformat/rtmppkt.c +ffmpeg/libavformat/rtmppkt.h +ffmpeg/libavformat/rtmpproto.c +ffmpeg/libavformat/rtp.c +ffmpeg/libavformat/rtp.h +ffmpeg/libavformat/rtpdec.c +ffmpeg/libavformat/rtpdec.h +ffmpeg/libavformat/rtpdec_amr.c +ffmpeg/libavformat/rtpdec_asf.c +ffmpeg/libavformat/rtpdec_formats.h +ffmpeg/libavformat/rtpdec_g726.c +ffmpeg/libavformat/rtpdec_h263.c +ffmpeg/libavformat/rtpdec_h263_rfc2190.c +ffmpeg/libavformat/rtpdec_h264.c +ffmpeg/libavformat/rtpdec_ilbc.c +ffmpeg/libavformat/rtpdec_jpeg.c +ffmpeg/libavformat/rtpdec_latm.c +ffmpeg/libavformat/rtpdec_mpeg12.c +ffmpeg/libavformat/rtpdec_mpeg4.c +ffmpeg/libavformat/rtpdec_mpegts.c +ffmpeg/libavformat/rtpdec_qcelp.c +ffmpeg/libavformat/rtpdec_qdm2.c +ffmpeg/libavformat/rtpdec_qt.c +ffmpeg/libavformat/rtpdec_svq3.c +ffmpeg/libavformat/rtpdec_vp8.c +ffmpeg/libavformat/rtpdec_xiph.c +ffmpeg/libavformat/rtpenc.c +ffmpeg/libavformat/rtpenc.h +ffmpeg/libavformat/rtpenc_aac.c +ffmpeg/libavformat/rtpenc_amr.c +ffmpeg/libavformat/rtpenc_chain.c +ffmpeg/libavformat/rtpenc_chain.h +ffmpeg/libavformat/rtpenc_h263.c +ffmpeg/libavformat/rtpenc_h263_rfc2190.c +ffmpeg/libavformat/rtpenc_h264.c +ffmpeg/libavformat/rtpenc_jpeg.c +ffmpeg/libavformat/rtpenc_latm.c +ffmpeg/libavformat/rtpenc_mpv.c +ffmpeg/libavformat/rtpenc_vp8.c +ffmpeg/libavformat/rtpenc_xiph.c +ffmpeg/libavformat/rtpproto.c +ffmpeg/libavformat/rtsp.c +ffmpeg/libavformat/rtsp.h +ffmpeg/libavformat/rtspcodes.h +ffmpeg/libavformat/rtspdec.c +ffmpeg/libavformat/rtspenc.c +ffmpeg/libavformat/samidec.c +ffmpeg/libavformat/sapdec.c +ffmpeg/libavformat/sapenc.c +ffmpeg/libavformat/sauce.c +ffmpeg/libavformat/sauce.h +ffmpeg/libavformat/sbgdec.c +ffmpeg/libavformat/sctp.c +ffmpeg/libavformat/sdp.c +ffmpeg/libavformat/seek-test.c +ffmpeg/libavformat/seek.c +ffmpeg/libavformat/seek.h +ffmpeg/libavformat/segafilm.c +ffmpeg/libavformat/segment.c +ffmpeg/libavformat/sierravmd.c +ffmpeg/libavformat/siff.c +ffmpeg/libavformat/smacker.c +ffmpeg/libavformat/smjpeg.c +ffmpeg/libavformat/smjpeg.h +ffmpeg/libavformat/smjpegdec.c +ffmpeg/libavformat/smjpegenc.c +ffmpeg/libavformat/smoothstreamingenc.c +ffmpeg/libavformat/smush.c +ffmpeg/libavformat/sol.c +ffmpeg/libavformat/sox.h +ffmpeg/libavformat/soxdec.c +ffmpeg/libavformat/soxenc.c +ffmpeg/libavformat/spdif.c +ffmpeg/libavformat/spdif.h +ffmpeg/libavformat/spdifdec.c +ffmpeg/libavformat/spdifenc.c +ffmpeg/libavformat/srtdec.c +ffmpeg/libavformat/srtenc.c +ffmpeg/libavformat/srtp.c +ffmpeg/libavformat/srtp.h +ffmpeg/libavformat/srtpproto.c +ffmpeg/libavformat/subtitles.c +ffmpeg/libavformat/subtitles.h +ffmpeg/libavformat/subviewer1dec.c +ffmpeg/libavformat/subviewerdec.c +ffmpeg/libavformat/swf.c +ffmpeg/libavformat/swf.h +ffmpeg/libavformat/swfdec.c +ffmpeg/libavformat/swfenc.c +ffmpeg/libavformat/takdec.c +ffmpeg/libavformat/tcp.c +ffmpeg/libavformat/tedcaptionsdec.c +ffmpeg/libavformat/tee.c +ffmpeg/libavformat/thp.c +ffmpeg/libavformat/tiertexseq.c +ffmpeg/libavformat/tls.c +ffmpeg/libavformat/tmv.c +ffmpeg/libavformat/tta.c +ffmpeg/libavformat/tty.c +ffmpeg/libavformat/txd.c +ffmpeg/libavformat/udp.c +ffmpeg/libavformat/url-test.c +ffmpeg/libavformat/url.h +ffmpeg/libavformat/urldecode.c +ffmpeg/libavformat/urldecode.h +ffmpeg/libavformat/utils.c +ffmpeg/libavformat/vc1test.c +ffmpeg/libavformat/vc1testenc.c +ffmpeg/libavformat/version.h +ffmpeg/libavformat/vivo.c +ffmpeg/libavformat/voc.c +ffmpeg/libavformat/voc.h +ffmpeg/libavformat/vocdec.c +ffmpeg/libavformat/vocenc.c +ffmpeg/libavformat/vorbiscomment.c +ffmpeg/libavformat/vorbiscomment.h +ffmpeg/libavformat/vplayerdec.c +ffmpeg/libavformat/vqf.c +ffmpeg/libavformat/w64.c +ffmpeg/libavformat/w64.h +ffmpeg/libavformat/wavdec.c +ffmpeg/libavformat/wavenc.c +ffmpeg/libavformat/wc3movie.c +ffmpeg/libavformat/webvttdec.c +ffmpeg/libavformat/westwood_aud.c +ffmpeg/libavformat/westwood_vqa.c +ffmpeg/libavformat/wtv.c +ffmpeg/libavformat/wtv.h +ffmpeg/libavformat/wtvdec.c +ffmpeg/libavformat/wtvenc.c +ffmpeg/libavformat/wv.c +ffmpeg/libavformat/wvenc.c +ffmpeg/libavformat/xa.c +ffmpeg/libavformat/xmv.c +ffmpeg/libavformat/xwma.c +ffmpeg/libavformat/yop.c +ffmpeg/libavformat/yuv4mpeg.c +ffmpeg/libavresample/arm/audio_convert_init.c +ffmpeg/libavresample/arm/audio_convert_neon.S +ffmpeg/libavresample/audio_convert.c +ffmpeg/libavresample/audio_convert.h +ffmpeg/libavresample/audio_data.c +ffmpeg/libavresample/audio_data.h +ffmpeg/libavresample/audio_mix.c +ffmpeg/libavresample/audio_mix.h +ffmpeg/libavresample/audio_mix_matrix.c +ffmpeg/libavresample/avresample-test.c +ffmpeg/libavresample/avresample.h +ffmpeg/libavresample/dither.c +ffmpeg/libavresample/dither.h +ffmpeg/libavresample/internal.h +ffmpeg/libavresample/libavresample.v +ffmpeg/libavresample/options.c +ffmpeg/libavresample/resample.c +ffmpeg/libavresample/resample.h +ffmpeg/libavresample/resample_template.c +ffmpeg/libavresample/utils.c +ffmpeg/libavresample/version.h +ffmpeg/libavresample/x86/audio_convert.asm +ffmpeg/libavresample/x86/audio_convert_init.c +ffmpeg/libavresample/x86/audio_mix.asm +ffmpeg/libavresample/x86/audio_mix_init.c +ffmpeg/libavresample/x86/dither.asm +ffmpeg/libavresample/x86/dither_init.c +ffmpeg/libavresample/x86/util.asm +ffmpeg/libavutil/adler32.c +ffmpeg/libavutil/adler32.h +ffmpeg/libavutil/aes.c +ffmpeg/libavutil/aes.h +ffmpeg/libavutil/arm/asm.S +ffmpeg/libavutil/arm/bswap.h +ffmpeg/libavutil/arm/cpu.c +ffmpeg/libavutil/arm/cpu.h +ffmpeg/libavutil/arm/float_dsp_arm.h +ffmpeg/libavutil/arm/float_dsp_init_arm.c +ffmpeg/libavutil/arm/float_dsp_init_neon.c +ffmpeg/libavutil/arm/float_dsp_init_vfp.c +ffmpeg/libavutil/arm/float_dsp_neon.S +ffmpeg/libavutil/arm/float_dsp_vfp.S +ffmpeg/libavutil/arm/intmath.h +ffmpeg/libavutil/arm/intreadwrite.h +ffmpeg/libavutil/arm/timer.h +ffmpeg/libavutil/attributes.h +ffmpeg/libavutil/audio_fifo.c +ffmpeg/libavutil/audio_fifo.h +ffmpeg/libavutil/audioconvert.h +ffmpeg/libavutil/avassert.h +ffmpeg/libavutil/avr32/bswap.h +ffmpeg/libavutil/avr32/intreadwrite.h +ffmpeg/libavutil/avstring.c +ffmpeg/libavutil/avstring.h +ffmpeg/libavutil/avutil.h +ffmpeg/libavutil/base64.c +ffmpeg/libavutil/base64.h +ffmpeg/libavutil/bfin/bswap.h +ffmpeg/libavutil/bfin/timer.h +ffmpeg/libavutil/blowfish.c +ffmpeg/libavutil/blowfish.h +ffmpeg/libavutil/bprint.c +ffmpeg/libavutil/bprint.h +ffmpeg/libavutil/bswap.h +ffmpeg/libavutil/channel_layout.c +ffmpeg/libavutil/channel_layout.h +ffmpeg/libavutil/colorspace.h +ffmpeg/libavutil/common.h +ffmpeg/libavutil/cpu.c +ffmpeg/libavutil/cpu.h +ffmpeg/libavutil/crc.c +ffmpeg/libavutil/crc.h +ffmpeg/libavutil/des.c +ffmpeg/libavutil/des.h +ffmpeg/libavutil/dict.c +ffmpeg/libavutil/dict.h +ffmpeg/libavutil/error.c +ffmpeg/libavutil/error.h +ffmpeg/libavutil/eval.c +ffmpeg/libavutil/eval.h +ffmpeg/libavutil/fifo.c +ffmpeg/libavutil/fifo.h +ffmpeg/libavutil/file.c +ffmpeg/libavutil/file.h +ffmpeg/libavutil/float_dsp.c +ffmpeg/libavutil/float_dsp.h +ffmpeg/libavutil/hmac.c +ffmpeg/libavutil/hmac.h +ffmpeg/libavutil/imgutils.c +ffmpeg/libavutil/imgutils.h +ffmpeg/libavutil/integer.c +ffmpeg/libavutil/integer.h +ffmpeg/libavutil/internal.h +ffmpeg/libavutil/intfloat.h +ffmpeg/libavutil/intfloat_readwrite.c +ffmpeg/libavutil/intfloat_readwrite.h +ffmpeg/libavutil/intmath.c +ffmpeg/libavutil/intmath.h +ffmpeg/libavutil/intreadwrite.h +ffmpeg/libavutil/lfg.c +ffmpeg/libavutil/lfg.h +ffmpeg/libavutil/libavutil.v +ffmpeg/libavutil/libm.h +ffmpeg/libavutil/lls.c +ffmpeg/libavutil/lls.h +ffmpeg/libavutil/log.c +ffmpeg/libavutil/log.h +ffmpeg/libavutil/log2_tab.c +ffmpeg/libavutil/lzo.c +ffmpeg/libavutil/lzo.h +ffmpeg/libavutil/mathematics.c +ffmpeg/libavutil/mathematics.h +ffmpeg/libavutil/md5.c +ffmpeg/libavutil/md5.h +ffmpeg/libavutil/mem.c +ffmpeg/libavutil/mem.h +ffmpeg/libavutil/mips/float_dsp_mips.c +ffmpeg/libavutil/mips/intreadwrite.h +ffmpeg/libavutil/mips/libm_mips.h +ffmpeg/libavutil/old_pix_fmts.h +ffmpeg/libavutil/opt.c +ffmpeg/libavutil/opt.h +ffmpeg/libavutil/parseutils.c +ffmpeg/libavutil/parseutils.h +ffmpeg/libavutil/pca.c +ffmpeg/libavutil/pca.h +ffmpeg/libavutil/pixdesc.c +ffmpeg/libavutil/pixdesc.h +ffmpeg/libavutil/pixfmt.h +ffmpeg/libavutil/ppc/cpu.c +ffmpeg/libavutil/ppc/float_dsp_altivec.c +ffmpeg/libavutil/ppc/float_dsp_altivec.h +ffmpeg/libavutil/ppc/float_dsp_init.c +ffmpeg/libavutil/ppc/intreadwrite.h +ffmpeg/libavutil/ppc/timer.h +ffmpeg/libavutil/ppc/types_altivec.h +ffmpeg/libavutil/ppc/util_altivec.h +ffmpeg/libavutil/qsort.h +ffmpeg/libavutil/random_seed.c +ffmpeg/libavutil/random_seed.h +ffmpeg/libavutil/rational.c +ffmpeg/libavutil/rational.h +ffmpeg/libavutil/rc4.c +ffmpeg/libavutil/rc4.h +ffmpeg/libavutil/samplefmt.c +ffmpeg/libavutil/samplefmt.h +ffmpeg/libavutil/sh4/bswap.h +ffmpeg/libavutil/sha.c +ffmpeg/libavutil/sha.h +ffmpeg/libavutil/softfloat.c +ffmpeg/libavutil/softfloat.h +ffmpeg/libavutil/time.c +ffmpeg/libavutil/time.h +ffmpeg/libavutil/timecode.c +ffmpeg/libavutil/timecode.h +ffmpeg/libavutil/timer.h +ffmpeg/libavutil/timestamp.h +ffmpeg/libavutil/tomi/intreadwrite.h +ffmpeg/libavutil/tree.c +ffmpeg/libavutil/tree.h +ffmpeg/libavutil/utils.c +ffmpeg/libavutil/version.h +ffmpeg/libavutil/x86/asm.h +ffmpeg/libavutil/x86/bswap.h +ffmpeg/libavutil/x86/cpu.c +ffmpeg/libavutil/x86/cpu.h +ffmpeg/libavutil/x86/cpuid.asm +ffmpeg/libavutil/x86/emms.asm +ffmpeg/libavutil/x86/emms.h +ffmpeg/libavutil/x86/float_dsp.asm +ffmpeg/libavutil/x86/float_dsp_init.c +ffmpeg/libavutil/x86/intreadwrite.h +ffmpeg/libavutil/x86/timer.h +ffmpeg/libavutil/x86/w64xmmtest.h +ffmpeg/libavutil/x86/x86inc.asm +ffmpeg/libavutil/x86/x86util.asm +ffmpeg/libavutil/x86_cpu.h +ffmpeg/libavutil/xga_font_data.c +ffmpeg/libavutil/xga_font_data.h +ffmpeg/libavutil/xtea.c +ffmpeg/libavutil/xtea.h +ffmpeg/libpostproc/libpostproc.v +ffmpeg/libpostproc/postprocess.c +ffmpeg/libpostproc/postprocess.h +ffmpeg/libpostproc/postprocess_altivec_template.c +ffmpeg/libpostproc/postprocess_internal.h +ffmpeg/libpostproc/postprocess_template.c +ffmpeg/libpostproc/version.h +ffmpeg/library.mak +ffmpeg/libswresample/arm/audio_convert_init.c +ffmpeg/libswresample/arm/audio_convert_neon.S +ffmpeg/libswresample/audioconvert.c +ffmpeg/libswresample/audioconvert.h +ffmpeg/libswresample/dither.c +ffmpeg/libswresample/dither_template.c +ffmpeg/libswresample/libswresample.v +ffmpeg/libswresample/log2_tab.c +ffmpeg/libswresample/noise_shaping_data.c +ffmpeg/libswresample/rematrix.c +ffmpeg/libswresample/rematrix_template.c +ffmpeg/libswresample/resample.c +ffmpeg/libswresample/resample_template.c +ffmpeg/libswresample/soxr_resample.c +ffmpeg/libswresample/swresample-test.c +ffmpeg/libswresample/swresample.c +ffmpeg/libswresample/swresample.h +ffmpeg/libswresample/swresample_internal.h +ffmpeg/libswresample/version.h +ffmpeg/libswresample/x86/audio_convert.asm +ffmpeg/libswresample/x86/rematrix.asm +ffmpeg/libswresample/x86/resample_mmx.h +ffmpeg/libswresample/x86/swresample_x86.c +ffmpeg/libswscale/bfin/internal_bfin.S +ffmpeg/libswscale/bfin/swscale_bfin.c +ffmpeg/libswscale/bfin/yuv2rgb_bfin.c +ffmpeg/libswscale/colorspace-test.c +ffmpeg/libswscale/input.c +ffmpeg/libswscale/libswscale.v +ffmpeg/libswscale/options.c +ffmpeg/libswscale/output.c +ffmpeg/libswscale/ppc/swscale_altivec.c +ffmpeg/libswscale/ppc/yuv2rgb_altivec.c +ffmpeg/libswscale/ppc/yuv2rgb_altivec.h +ffmpeg/libswscale/ppc/yuv2yuv_altivec.c +ffmpeg/libswscale/rgb2rgb.c +ffmpeg/libswscale/rgb2rgb.h +ffmpeg/libswscale/rgb2rgb_template.c +ffmpeg/libswscale/sparc/yuv2rgb_vis.c +ffmpeg/libswscale/swscale-test.c +ffmpeg/libswscale/swscale.c +ffmpeg/libswscale/swscale.h +ffmpeg/libswscale/swscale_internal.h +ffmpeg/libswscale/swscale_unscaled.c +ffmpeg/libswscale/utils.c +ffmpeg/libswscale/version.h +ffmpeg/libswscale/x86/input.asm +ffmpeg/libswscale/x86/output.asm +ffmpeg/libswscale/x86/rgb2rgb.c +ffmpeg/libswscale/x86/rgb2rgb_template.c +ffmpeg/libswscale/x86/scale.asm +ffmpeg/libswscale/x86/swscale.c +ffmpeg/libswscale/x86/swscale_template.c +ffmpeg/libswscale/x86/w64xmmtest.c +ffmpeg/libswscale/x86/yuv2rgb.c +ffmpeg/libswscale/x86/yuv2rgb_template.c +ffmpeg/libswscale/yuv2rgb.c +ffmpeg/presets/libvpx-1080p.ffpreset +ffmpeg/presets/libvpx-1080p50_60.ffpreset +ffmpeg/presets/libvpx-360p.ffpreset +ffmpeg/presets/libvpx-720p.ffpreset +ffmpeg/presets/libvpx-720p50_60.ffpreset +ffmpeg/presets/libx264-ipod320.ffpreset +ffmpeg/presets/libx264-ipod640.ffpreset +ffmpeg/tests/audiogen.c +ffmpeg/tests/base64.c +ffmpeg/tests/copycooker.sh +ffmpeg/tests/fate-run.sh +ffmpeg/tests/fate-update.sh +ffmpeg/tests/fate-valgrind.supp +ffmpeg/tests/fate.sh +ffmpeg/tests/fate/aac.mak +ffmpeg/tests/fate/ac3.mak +ffmpeg/tests/fate/acodec.mak +ffmpeg/tests/fate/adpcm.mak +ffmpeg/tests/fate/alac.mak +ffmpeg/tests/fate/als.mak +ffmpeg/tests/fate/amrnb.mak +ffmpeg/tests/fate/amrwb.mak +ffmpeg/tests/fate/atrac.mak +ffmpeg/tests/fate/audio.mak +ffmpeg/tests/fate/avfilter.mak +ffmpeg/tests/fate/avformat.mak +ffmpeg/tests/fate/bmp.mak +ffmpeg/tests/fate/cdxl.mak +ffmpeg/tests/fate/cover-art.mak +ffmpeg/tests/fate/demux.mak +ffmpeg/tests/fate/dfa.mak +ffmpeg/tests/fate/dpcm.mak +ffmpeg/tests/fate/ea.mak +ffmpeg/tests/fate/ffmpeg.mak +ffmpeg/tests/fate/ffprobe.mak +ffmpeg/tests/fate/fft.mak +ffmpeg/tests/fate/filter.mak +ffmpeg/tests/fate/flac.mak +ffmpeg/tests/fate/gif.mak +ffmpeg/tests/fate/h264.mak +ffmpeg/tests/fate/image.mak +ffmpeg/tests/fate/indeo.mak +ffmpeg/tests/fate/libavcodec.mak +ffmpeg/tests/fate/libavformat.mak +ffmpeg/tests/fate/libavutil.mak +ffmpeg/tests/fate/lossless-audio.mak +ffmpeg/tests/fate/lossless-video.mak +ffmpeg/tests/fate/microsoft.mak +ffmpeg/tests/fate/mp3.mak +ffmpeg/tests/fate/mpc.mak +ffmpeg/tests/fate/pcm.mak +ffmpeg/tests/fate/probe.mak +ffmpeg/tests/fate/prores.mak +ffmpeg/tests/fate/qt.mak +ffmpeg/tests/fate/qtrle.mak +ffmpeg/tests/fate/real.mak +ffmpeg/tests/fate/screen.mak +ffmpeg/tests/fate/seek.mak +ffmpeg/tests/fate/subtitles.mak +ffmpeg/tests/fate/utvideo.mak +ffmpeg/tests/fate/vcodec.mak +ffmpeg/tests/fate/video.mak +ffmpeg/tests/fate/voice.mak +ffmpeg/tests/fate/vorbis.mak +ffmpeg/tests/fate/vpx.mak +ffmpeg/tests/fate/vqf.mak +ffmpeg/tests/fate/wavpack.mak +ffmpeg/tests/fate/wma.mak +ffmpeg/tests/ffserver-regression.sh +ffmpeg/tests/ffserver.conf +ffmpeg/tests/ffserver.regression.ref +ffmpeg/tests/lavf-regression.sh +ffmpeg/tests/lavfi-regression.sh +ffmpeg/tests/lena.pnm +ffmpeg/tests/md5.sh +ffmpeg/tests/ref/acodec/adpcm-adx +ffmpeg/tests/ref/acodec/adpcm-ima_qt +ffmpeg/tests/ref/acodec/adpcm-ima_wav +ffmpeg/tests/ref/acodec/adpcm-ms +ffmpeg/tests/ref/acodec/adpcm-swf +ffmpeg/tests/ref/acodec/adpcm-yamaha +ffmpeg/tests/ref/acodec/adpcm_ima_qt +ffmpeg/tests/ref/acodec/alac +ffmpeg/tests/ref/acodec/flac +ffmpeg/tests/ref/acodec/g723_1 +ffmpeg/tests/ref/acodec/mp2 +ffmpeg/tests/ref/acodec/pcm-alaw +ffmpeg/tests/ref/acodec/pcm-f32be +ffmpeg/tests/ref/acodec/pcm-f32le +ffmpeg/tests/ref/acodec/pcm-f64be +ffmpeg/tests/ref/acodec/pcm-f64le +ffmpeg/tests/ref/acodec/pcm-mulaw +ffmpeg/tests/ref/acodec/pcm-s16be +ffmpeg/tests/ref/acodec/pcm-s16be_planar +ffmpeg/tests/ref/acodec/pcm-s16le +ffmpeg/tests/ref/acodec/pcm-s16le_planar +ffmpeg/tests/ref/acodec/pcm-s24be +ffmpeg/tests/ref/acodec/pcm-s24le +ffmpeg/tests/ref/acodec/pcm-s24le_planar +ffmpeg/tests/ref/acodec/pcm-s32be +ffmpeg/tests/ref/acodec/pcm-s32le +ffmpeg/tests/ref/acodec/pcm-s32le_planar +ffmpeg/tests/ref/acodec/pcm-s8 +ffmpeg/tests/ref/acodec/pcm-s8_planar +ffmpeg/tests/ref/acodec/pcm-u16be +ffmpeg/tests/ref/acodec/pcm-u16le +ffmpeg/tests/ref/acodec/pcm-u24be +ffmpeg/tests/ref/acodec/pcm-u24le +ffmpeg/tests/ref/acodec/pcm-u32be +ffmpeg/tests/ref/acodec/pcm-u32le +ffmpeg/tests/ref/acodec/pcm-u8 +ffmpeg/tests/ref/acodec/roqaudio +ffmpeg/tests/ref/fate/4xm-1 +ffmpeg/tests/ref/fate/4xm-2 +ffmpeg/tests/ref/fate/8bps +ffmpeg/tests/ref/fate/aasc +ffmpeg/tests/ref/fate/acodec-aref +ffmpeg/tests/ref/fate/adpcm-4xm +ffmpeg/tests/ref/fate/adpcm-afc +ffmpeg/tests/ref/fate/adpcm-creative +ffmpeg/tests/ref/fate/adpcm-creative-8-2.6bit +ffmpeg/tests/ref/fate/adpcm-creative-8-2bit +ffmpeg/tests/ref/fate/adpcm-creative-8-4bit +ffmpeg/tests/ref/fate/adpcm-ea-1 +ffmpeg/tests/ref/fate/adpcm-ea-2 +ffmpeg/tests/ref/fate/adpcm-ea-maxis-xa +ffmpeg/tests/ref/fate/adpcm-ea-r1 +ffmpeg/tests/ref/fate/adpcm-ea-r2 +ffmpeg/tests/ref/fate/adpcm-ea-r3 +ffmpeg/tests/ref/fate/adpcm-ima-amv +ffmpeg/tests/ref/fate/adpcm-ima-apc +ffmpeg/tests/ref/fate/adpcm-ima-dk3 +ffmpeg/tests/ref/fate/adpcm-ima-dk4 +ffmpeg/tests/ref/fate/adpcm-ima-ea-eacs +ffmpeg/tests/ref/fate/adpcm-ima-ea-sead +ffmpeg/tests/ref/fate/adpcm-ima-iss +ffmpeg/tests/ref/fate/adpcm-ima-oki +ffmpeg/tests/ref/fate/adpcm-ima-smjpeg +ffmpeg/tests/ref/fate/adpcm-ima-ws +ffmpeg/tests/ref/fate/adpcm-ima_wav-stereo +ffmpeg/tests/ref/fate/adpcm-ms-mono +ffmpeg/tests/ref/fate/adpcm-thp +ffmpeg/tests/ref/fate/adpcm-xa +ffmpeg/tests/ref/fate/adpcm_ms-stereo +ffmpeg/tests/ref/fate/adts-demux +ffmpeg/tests/ref/fate/aea-demux +ffmpeg/tests/ref/fate/alg-mm +ffmpeg/tests/ref/fate/amv +ffmpeg/tests/ref/fate/ansi +ffmpeg/tests/ref/fate/ansi256 +ffmpeg/tests/ref/fate/armovie-escape124 +ffmpeg/tests/ref/fate/ast +ffmpeg/tests/ref/fate/auravision-v1 +ffmpeg/tests/ref/fate/auravision-v2 +ffmpeg/tests/ref/fate/avio-direct +ffmpeg/tests/ref/fate/avstring +ffmpeg/tests/ref/fate/base64 +ffmpeg/tests/ref/fate/bethsoft-vid +ffmpeg/tests/ref/fate/bfi +ffmpeg/tests/ref/fate/bink-demux +ffmpeg/tests/ref/fate/bink-video-b +ffmpeg/tests/ref/fate/bink-video-f +ffmpeg/tests/ref/fate/bink-video-i +ffmpeg/tests/ref/fate/blowfish +ffmpeg/tests/ref/fate/bmp-15bit +ffmpeg/tests/ref/fate/bmp-15bit-mask +ffmpeg/tests/ref/fate/bmp-16bit-mask +ffmpeg/tests/ref/fate/bmp-1bit +ffmpeg/tests/ref/fate/bmp-24bit +ffmpeg/tests/ref/fate/bmp-32bit +ffmpeg/tests/ref/fate/bmp-32bit-mask +ffmpeg/tests/ref/fate/bmp-4bit +ffmpeg/tests/ref/fate/bmp-4bit-os2 +ffmpeg/tests/ref/fate/bmp-8bit +ffmpeg/tests/ref/fate/bmp-8bit-os2 +ffmpeg/tests/ref/fate/bmp-rle4 +ffmpeg/tests/ref/fate/bmp-rle8 +ffmpeg/tests/ref/fate/bmv-audio +ffmpeg/tests/ref/fate/bmv-video +ffmpeg/tests/ref/fate/bprint +ffmpeg/tests/ref/fate/brstm +ffmpeg/tests/ref/fate/caf +ffmpeg/tests/ref/fate/cavs +ffmpeg/tests/ref/fate/cdgraphics +ffmpeg/tests/ref/fate/cdxl-bitline-ham6 +ffmpeg/tests/ref/fate/cdxl-demux +ffmpeg/tests/ref/fate/cdxl-ham6 +ffmpeg/tests/ref/fate/cdxl-ham8 +ffmpeg/tests/ref/fate/cdxl-pal8 +ffmpeg/tests/ref/fate/cdxl-pal8-small +ffmpeg/tests/ref/fate/cljr +ffmpeg/tests/ref/fate/cllc-argb +ffmpeg/tests/ref/fate/cllc-rgb +ffmpeg/tests/ref/fate/corepng +ffmpeg/tests/ref/fate/crc +ffmpeg/tests/ref/fate/creatureshock-avs +ffmpeg/tests/ref/fate/cscd +ffmpeg/tests/ref/fate/cvid-grayscale +ffmpeg/tests/ref/fate/cvid-palette +ffmpeg/tests/ref/fate/cvid-partial +ffmpeg/tests/ref/fate/cyberia-c93 +ffmpeg/tests/ref/fate/cyuv +ffmpeg/tests/ref/fate/d-cinema-demux +ffmpeg/tests/ref/fate/dcinema-encode +ffmpeg/tests/ref/fate/delphine-cin-audio +ffmpeg/tests/ref/fate/delphine-cin-video +ffmpeg/tests/ref/fate/deluxepaint-anm +ffmpeg/tests/ref/fate/dfa1 +ffmpeg/tests/ref/fate/dfa10 +ffmpeg/tests/ref/fate/dfa11 +ffmpeg/tests/ref/fate/dfa2 +ffmpeg/tests/ref/fate/dfa3 +ffmpeg/tests/ref/fate/dfa4 +ffmpeg/tests/ref/fate/dfa5 +ffmpeg/tests/ref/fate/dfa6 +ffmpeg/tests/ref/fate/dfa7 +ffmpeg/tests/ref/fate/dfa8 +ffmpeg/tests/ref/fate/dfa9 +ffmpeg/tests/ref/fate/dirac +ffmpeg/tests/ref/fate/dpcm-idroq +ffmpeg/tests/ref/fate/dpcm-interplay +ffmpeg/tests/ref/fate/dpcm-sierra +ffmpeg/tests/ref/fate/dpcm-xan +ffmpeg/tests/ref/fate/dpx +ffmpeg/tests/ref/fate/dxa-feeble +ffmpeg/tests/ref/fate/dxa-scummvm +ffmpeg/tests/ref/fate/dxtory +ffmpeg/tests/ref/fate/ea-cdata +ffmpeg/tests/ref/fate/ea-cmv +ffmpeg/tests/ref/fate/ea-mad +ffmpeg/tests/ref/fate/ea-tgq +ffmpeg/tests/ref/fate/ea-tgv-1 +ffmpeg/tests/ref/fate/ea-tgv-2 +ffmpeg/tests/ref/fate/ea-tqi +ffmpeg/tests/ref/fate/eval +ffmpeg/tests/ref/fate/ffprobe_compact +ffmpeg/tests/ref/fate/ffprobe_csv +ffmpeg/tests/ref/fate/ffprobe_default +ffmpeg/tests/ref/fate/ffprobe_flat +ffmpeg/tests/ref/fate/ffprobe_ini +ffmpeg/tests/ref/fate/ffprobe_json +ffmpeg/tests/ref/fate/ffprobe_xml +ffmpeg/tests/ref/fate/fifo +ffmpeg/tests/ref/fate/film-cvid +ffmpeg/tests/ref/fate/filter-delogo +ffmpeg/tests/ref/fate/filter-gradfun +ffmpeg/tests/ref/fate/filter-hqdn3d +ffmpeg/tests/ref/fate/filter-metadata-scenedetect +ffmpeg/tests/ref/fate/filter-metadata-silencedetect +ffmpeg/tests/ref/fate/filter-yadif-mode0 +ffmpeg/tests/ref/fate/filter-yadif-mode1 +ffmpeg/tests/ref/fate/flic-af11-palette-change +ffmpeg/tests/ref/fate/flic-af12 +ffmpeg/tests/ref/fate/flic-magiccarpet +ffmpeg/tests/ref/fate/force_key_frames +ffmpeg/tests/ref/fate/fraps-v0 +ffmpeg/tests/ref/fate/fraps-v1 +ffmpeg/tests/ref/fate/fraps-v2 +ffmpeg/tests/ref/fate/fraps-v3 +ffmpeg/tests/ref/fate/fraps-v4 +ffmpeg/tests/ref/fate/fraps-v5 +ffmpeg/tests/ref/fate/frwu +ffmpeg/tests/ref/fate/g722-encode +ffmpeg/tests/ref/fate/g722dec-1 +ffmpeg/tests/ref/fate/g723_1-dec-1 +ffmpeg/tests/ref/fate/g723_1-dec-2 +ffmpeg/tests/ref/fate/g723_1-dec-3 +ffmpeg/tests/ref/fate/g723_1-dec-4 +ffmpeg/tests/ref/fate/g723_1-dec-5 +ffmpeg/tests/ref/fate/g723_1-dec-6 +ffmpeg/tests/ref/fate/g723_1-dec-7 +ffmpeg/tests/ref/fate/g723_1-dec-8 +ffmpeg/tests/ref/fate/g726-encode-2bit +ffmpeg/tests/ref/fate/g726-encode-3bit +ffmpeg/tests/ref/fate/g726-encode-4bit +ffmpeg/tests/ref/fate/g726-encode-5bit +ffmpeg/tests/ref/fate/g729-0 +ffmpeg/tests/ref/fate/g729-1 +ffmpeg/tests/ref/fate/gif-color +ffmpeg/tests/ref/fate/gif-demux +ffmpeg/tests/ref/fate/gif-disposal-restore +ffmpeg/tests/ref/fate/gif-gray +ffmpeg/tests/ref/fate/gsm-ms +ffmpeg/tests/ref/fate/gsm-toast +ffmpeg/tests/ref/fate/h264-bsf-mp4toannexb +ffmpeg/tests/ref/fate/h264-conformance-aud_mw_e +ffmpeg/tests/ref/fate/h264-conformance-ba1_ft_c +ffmpeg/tests/ref/fate/h264-conformance-ba1_sony_d +ffmpeg/tests/ref/fate/h264-conformance-ba2_sony_f +ffmpeg/tests/ref/fate/h264-conformance-ba3_sva_c +ffmpeg/tests/ref/fate/h264-conformance-ba_mw_d +ffmpeg/tests/ref/fate/h264-conformance-bamq1_jvc_c +ffmpeg/tests/ref/fate/h264-conformance-bamq2_jvc_c +ffmpeg/tests/ref/fate/h264-conformance-banm_mw_d +ffmpeg/tests/ref/fate/h264-conformance-basqp1_sony_c +ffmpeg/tests/ref/fate/h264-conformance-caba1_sony_d +ffmpeg/tests/ref/fate/h264-conformance-caba1_sva_b +ffmpeg/tests/ref/fate/h264-conformance-caba2_sony_e +ffmpeg/tests/ref/fate/h264-conformance-caba2_sva_b +ffmpeg/tests/ref/fate/h264-conformance-caba3_sony_c +ffmpeg/tests/ref/fate/h264-conformance-caba3_sva_b +ffmpeg/tests/ref/fate/h264-conformance-caba3_toshiba_e +ffmpeg/tests/ref/fate/h264-conformance-cabac_mot_fld0_full +ffmpeg/tests/ref/fate/h264-conformance-cabac_mot_frm0_full +ffmpeg/tests/ref/fate/h264-conformance-cabac_mot_mbaff0_full +ffmpeg/tests/ref/fate/h264-conformance-cabac_mot_picaff0_full +ffmpeg/tests/ref/fate/h264-conformance-cabaci3_sony_b +ffmpeg/tests/ref/fate/h264-conformance-cabast3_sony_e +ffmpeg/tests/ref/fate/h264-conformance-cabastbr3_sony_b +ffmpeg/tests/ref/fate/h264-conformance-cabref3_sand_d +ffmpeg/tests/ref/fate/h264-conformance-cacqp3_sony_d +ffmpeg/tests/ref/fate/h264-conformance-cafi1_sva_c +ffmpeg/tests/ref/fate/h264-conformance-cama1_sony_c +ffmpeg/tests/ref/fate/h264-conformance-cama1_toshiba_b +ffmpeg/tests/ref/fate/h264-conformance-cama1_vtc_c +ffmpeg/tests/ref/fate/h264-conformance-cama2_vtc_b +ffmpeg/tests/ref/fate/h264-conformance-cama3_sand_e +ffmpeg/tests/ref/fate/h264-conformance-cama3_vtc_b +ffmpeg/tests/ref/fate/h264-conformance-camaci3_sony_c +ffmpeg/tests/ref/fate/h264-conformance-camanl1_toshiba_b +ffmpeg/tests/ref/fate/h264-conformance-camanl2_toshiba_b +ffmpeg/tests/ref/fate/h264-conformance-camanl3_sand_e +ffmpeg/tests/ref/fate/h264-conformance-camasl3_sony_b +ffmpeg/tests/ref/fate/h264-conformance-camp_mot_mbaff_l30 +ffmpeg/tests/ref/fate/h264-conformance-camp_mot_mbaff_l31 +ffmpeg/tests/ref/fate/h264-conformance-canl1_sony_e +ffmpeg/tests/ref/fate/h264-conformance-canl1_sva_b +ffmpeg/tests/ref/fate/h264-conformance-canl1_toshiba_g +ffmpeg/tests/ref/fate/h264-conformance-canl2_sony_e +ffmpeg/tests/ref/fate/h264-conformance-canl2_sva_b +ffmpeg/tests/ref/fate/h264-conformance-canl3_sony_c +ffmpeg/tests/ref/fate/h264-conformance-canl3_sva_b +ffmpeg/tests/ref/fate/h264-conformance-canl4_sva_b +ffmpeg/tests/ref/fate/h264-conformance-canlma2_sony_c +ffmpeg/tests/ref/fate/h264-conformance-canlma3_sony_c +ffmpeg/tests/ref/fate/h264-conformance-capa1_toshiba_b +ffmpeg/tests/ref/fate/h264-conformance-capama3_sand_f +ffmpeg/tests/ref/fate/h264-conformance-capcm1_sand_e +ffmpeg/tests/ref/fate/h264-conformance-capcmnl1_sand_e +ffmpeg/tests/ref/fate/h264-conformance-capm3_sony_d +ffmpeg/tests/ref/fate/h264-conformance-caqp1_sony_b +ffmpeg/tests/ref/fate/h264-conformance-cavlc_mot_fld0_full_b +ffmpeg/tests/ref/fate/h264-conformance-cavlc_mot_frm0_full_b +ffmpeg/tests/ref/fate/h264-conformance-cavlc_mot_mbaff0_full_b +ffmpeg/tests/ref/fate/h264-conformance-cavlc_mot_picaff0_full_b +ffmpeg/tests/ref/fate/h264-conformance-cawp1_toshiba_e +ffmpeg/tests/ref/fate/h264-conformance-cawp5_toshiba_e +ffmpeg/tests/ref/fate/h264-conformance-ci1_ft_b +ffmpeg/tests/ref/fate/h264-conformance-ci_mw_d +ffmpeg/tests/ref/fate/h264-conformance-cvbs3_sony_c +ffmpeg/tests/ref/fate/h264-conformance-cvcanlma2_sony_c +ffmpeg/tests/ref/fate/h264-conformance-cvfi1_sony_d +ffmpeg/tests/ref/fate/h264-conformance-cvfi1_sva_c +ffmpeg/tests/ref/fate/h264-conformance-cvfi2_sony_h +ffmpeg/tests/ref/fate/h264-conformance-cvfi2_sva_c +ffmpeg/tests/ref/fate/h264-conformance-cvma1_sony_d +ffmpeg/tests/ref/fate/h264-conformance-cvma1_toshiba_b +ffmpeg/tests/ref/fate/h264-conformance-cvmanl1_toshiba_b +ffmpeg/tests/ref/fate/h264-conformance-cvmanl2_toshiba_b +ffmpeg/tests/ref/fate/h264-conformance-cvmapaqp3_sony_e +ffmpeg/tests/ref/fate/h264-conformance-cvmaqp2_sony_g +ffmpeg/tests/ref/fate/h264-conformance-cvmaqp3_sony_d +ffmpeg/tests/ref/fate/h264-conformance-cvmp_mot_fld_l30_b +ffmpeg/tests/ref/fate/h264-conformance-cvmp_mot_frm_l31_b +ffmpeg/tests/ref/fate/h264-conformance-cvnlfi1_sony_c +ffmpeg/tests/ref/fate/h264-conformance-cvnlfi2_sony_h +ffmpeg/tests/ref/fate/h264-conformance-cvpa1_toshiba_b +ffmpeg/tests/ref/fate/h264-conformance-cvpcmnl1_sva_c +ffmpeg/tests/ref/fate/h264-conformance-cvpcmnl2_sva_c +ffmpeg/tests/ref/fate/h264-conformance-cvwp1_toshiba_e +ffmpeg/tests/ref/fate/h264-conformance-cvwp2_toshiba_e +ffmpeg/tests/ref/fate/h264-conformance-cvwp3_toshiba_e +ffmpeg/tests/ref/fate/h264-conformance-cvwp5_toshiba_e +ffmpeg/tests/ref/fate/h264-conformance-fi1_sony_e +ffmpeg/tests/ref/fate/h264-conformance-frext-alphaconformanceg +ffmpeg/tests/ref/fate/h264-conformance-frext-bcrm_freh10 +ffmpeg/tests/ref/fate/h264-conformance-frext-brcm_freh11 +ffmpeg/tests/ref/fate/h264-conformance-frext-brcm_freh3 +ffmpeg/tests/ref/fate/h264-conformance-frext-brcm_freh4 +ffmpeg/tests/ref/fate/h264-conformance-frext-brcm_freh5 +ffmpeg/tests/ref/fate/h264-conformance-frext-brcm_freh8 +ffmpeg/tests/ref/fate/h264-conformance-frext-brcm_freh9 +ffmpeg/tests/ref/fate/h264-conformance-frext-freh12_b +ffmpeg/tests/ref/fate/h264-conformance-frext-freh1_b +ffmpeg/tests/ref/fate/h264-conformance-frext-freh2_b +ffmpeg/tests/ref/fate/h264-conformance-frext-freh6 +ffmpeg/tests/ref/fate/h264-conformance-frext-freh7_b +ffmpeg/tests/ref/fate/h264-conformance-frext-frext01_jvc_d +ffmpeg/tests/ref/fate/h264-conformance-frext-frext02_jvc_c +ffmpeg/tests/ref/fate/h264-conformance-frext-frext1_panasonic_c +ffmpeg/tests/ref/fate/h264-conformance-frext-frext2_panasonic_b +ffmpeg/tests/ref/fate/h264-conformance-frext-frext3_panasonic_d +ffmpeg/tests/ref/fate/h264-conformance-frext-frext4_panasonic_a +ffmpeg/tests/ref/fate/h264-conformance-frext-frext_mmco4_sony_b +ffmpeg/tests/ref/fate/h264-conformance-frext-hcaff1_hhi_b +ffmpeg/tests/ref/fate/h264-conformance-frext-hcafr1_hhi_c +ffmpeg/tests/ref/fate/h264-conformance-frext-hcafr2_hhi_a +ffmpeg/tests/ref/fate/h264-conformance-frext-hcafr3_hhi_a +ffmpeg/tests/ref/fate/h264-conformance-frext-hcafr4_hhi_a +ffmpeg/tests/ref/fate/h264-conformance-frext-hcamff1_hhi_b +ffmpeg/tests/ref/fate/h264-conformance-frext-hi422fr10_sony_b +ffmpeg/tests/ref/fate/h264-conformance-frext-hi422fr13_sony_b +ffmpeg/tests/ref/fate/h264-conformance-frext-hi422fr1_sony_a +ffmpeg/tests/ref/fate/h264-conformance-frext-hi422fr6_sony_a +ffmpeg/tests/ref/fate/h264-conformance-frext-hpca_brcm_c +ffmpeg/tests/ref/fate/h264-conformance-frext-hpcadq_brcm_b +ffmpeg/tests/ref/fate/h264-conformance-frext-hpcafl_bcrm_c +ffmpeg/tests/ref/fate/h264-conformance-frext-hpcaflnl_bcrm_c +ffmpeg/tests/ref/fate/h264-conformance-frext-hpcalq_brcm_b +ffmpeg/tests/ref/fate/h264-conformance-frext-hpcamapalq_bcrm_b +ffmpeg/tests/ref/fate/h264-conformance-frext-hpcamolq_brcm_b +ffmpeg/tests/ref/fate/h264-conformance-frext-hpcanl_brcm_c +ffmpeg/tests/ref/fate/h264-conformance-frext-hpcaq2lq_brcm_b +ffmpeg/tests/ref/fate/h264-conformance-frext-hpcv_brcm_a +ffmpeg/tests/ref/fate/h264-conformance-frext-hpcvfl_bcrm_a +ffmpeg/tests/ref/fate/h264-conformance-frext-hpcvflnl_bcrm_a +ffmpeg/tests/ref/fate/h264-conformance-frext-hpcvmolq_brcm_b +ffmpeg/tests/ref/fate/h264-conformance-frext-hpcvnl_brcm_a +ffmpeg/tests/ref/fate/h264-conformance-frext-pph10i1_panasonic_a +ffmpeg/tests/ref/fate/h264-conformance-frext-pph10i2_panasonic_a +ffmpeg/tests/ref/fate/h264-conformance-frext-pph10i3_panasonic_a +ffmpeg/tests/ref/fate/h264-conformance-frext-pph10i4_panasonic_a +ffmpeg/tests/ref/fate/h264-conformance-frext-pph10i5_panasonic_a +ffmpeg/tests/ref/fate/h264-conformance-frext-pph10i6_panasonic_a +ffmpeg/tests/ref/fate/h264-conformance-frext-pph10i7_panasonic_a +ffmpeg/tests/ref/fate/h264-conformance-frext-pph422i1_panasonic_a +ffmpeg/tests/ref/fate/h264-conformance-frext-pph422i2_panasonic_a +ffmpeg/tests/ref/fate/h264-conformance-frext-pph422i3_panasonic_a +ffmpeg/tests/ref/fate/h264-conformance-frext-pph422i4_panasonic_a +ffmpeg/tests/ref/fate/h264-conformance-frext-pph422i5_panasonic_a +ffmpeg/tests/ref/fate/h264-conformance-frext-pph422i6_panasonic_a +ffmpeg/tests/ref/fate/h264-conformance-frext-pph422i7_panasonic_a +ffmpeg/tests/ref/fate/h264-conformance-hcbp2_hhi_a +ffmpeg/tests/ref/fate/h264-conformance-hcmp1_hhi_a +ffmpeg/tests/ref/fate/h264-conformance-ls_sva_d +ffmpeg/tests/ref/fate/h264-conformance-midr_mw_d +ffmpeg/tests/ref/fate/h264-conformance-mps_mw_a +ffmpeg/tests/ref/fate/h264-conformance-mr1_bt_a +ffmpeg/tests/ref/fate/h264-conformance-mr1_mw_a +ffmpeg/tests/ref/fate/h264-conformance-mr2_mw_a +ffmpeg/tests/ref/fate/h264-conformance-mr2_tandberg_e +ffmpeg/tests/ref/fate/h264-conformance-mr3_tandberg_b +ffmpeg/tests/ref/fate/h264-conformance-mr4_tandberg_c +ffmpeg/tests/ref/fate/h264-conformance-mr5_tandberg_c +ffmpeg/tests/ref/fate/h264-conformance-mr6_bt_b +ffmpeg/tests/ref/fate/h264-conformance-mr7_bt_b +ffmpeg/tests/ref/fate/h264-conformance-mr8_bt_b +ffmpeg/tests/ref/fate/h264-conformance-mr9_bt_b +ffmpeg/tests/ref/fate/h264-conformance-mv1_brcm_d +ffmpeg/tests/ref/fate/h264-conformance-nl1_sony_d +ffmpeg/tests/ref/fate/h264-conformance-nl2_sony_h +ffmpeg/tests/ref/fate/h264-conformance-nl3_sva_e +ffmpeg/tests/ref/fate/h264-conformance-nlmq1_jvc_c +ffmpeg/tests/ref/fate/h264-conformance-nlmq2_jvc_c +ffmpeg/tests/ref/fate/h264-conformance-nrf_mw_e +ffmpeg/tests/ref/fate/h264-conformance-sharp_mp_field_1_b +ffmpeg/tests/ref/fate/h264-conformance-sharp_mp_field_2_b +ffmpeg/tests/ref/fate/h264-conformance-sharp_mp_field_3_b +ffmpeg/tests/ref/fate/h264-conformance-sharp_mp_paff_1r2 +ffmpeg/tests/ref/fate/h264-conformance-sharp_mp_paff_2r +ffmpeg/tests/ref/fate/h264-conformance-sl1_sva_b +ffmpeg/tests/ref/fate/h264-conformance-sva_ba1_b +ffmpeg/tests/ref/fate/h264-conformance-sva_ba2_d +ffmpeg/tests/ref/fate/h264-conformance-sva_base_b +ffmpeg/tests/ref/fate/h264-conformance-sva_cl1_e +ffmpeg/tests/ref/fate/h264-conformance-sva_fm1_e +ffmpeg/tests/ref/fate/h264-conformance-sva_nl1_b +ffmpeg/tests/ref/fate/h264-conformance-sva_nl2_e +ffmpeg/tests/ref/fate/h264-extreme-plane-pred +ffmpeg/tests/ref/fate/h264-interlace-crop +ffmpeg/tests/ref/fate/h264-lossless +ffmpeg/tests/ref/fate/hmac +ffmpeg/tests/ref/fate/id-cin-video +ffmpeg/tests/ref/fate/idroq-video-encode +ffmpeg/tests/ref/fate/iff-byterun1 +ffmpeg/tests/ref/fate/iff-fibonacci +ffmpeg/tests/ref/fate/iff-ilbm +ffmpeg/tests/ref/fate/iff-pcm +ffmpeg/tests/ref/fate/iirfilter +ffmpeg/tests/ref/fate/indeo2 +ffmpeg/tests/ref/fate/indeo3 +ffmpeg/tests/ref/fate/indeo4 +ffmpeg/tests/ref/fate/indeo5 +ffmpeg/tests/ref/fate/interplay-mve-16bit +ffmpeg/tests/ref/fate/interplay-mve-8bit +ffmpeg/tests/ref/fate/iv8-demux +ffmpeg/tests/ref/fate/jv +ffmpeg/tests/ref/fate/jv-demux +ffmpeg/tests/ref/fate/kgv1 +ffmpeg/tests/ref/fate/kmvc +ffmpeg/tests/ref/fate/lagarith-rgb24 +ffmpeg/tests/ref/fate/lagarith-rgb32 +ffmpeg/tests/ref/fate/lagarith-yuy2 +ffmpeg/tests/ref/fate/lagarith-yv12 +ffmpeg/tests/ref/fate/lmlm4-demux +ffmpeg/tests/ref/fate/loco-rgb +ffmpeg/tests/ref/fate/loco-yuy2 +ffmpeg/tests/ref/fate/lossless-alac +ffmpeg/tests/ref/fate/lossless-meridianaudio +ffmpeg/tests/ref/fate/lossless-monkeysaudio +ffmpeg/tests/ref/fate/lossless-shorten +ffmpeg/tests/ref/fate/lossless-tak +ffmpeg/tests/ref/fate/lossless-tta +ffmpeg/tests/ref/fate/lossless-tta-encrypted +ffmpeg/tests/ref/fate/lossless-wma +ffmpeg/tests/ref/fate/mapchan-6ch-extract-2 +ffmpeg/tests/ref/fate/mapchan-6ch-extract-2-downmix-mono +ffmpeg/tests/ref/fate/mapchan-silent-mono +ffmpeg/tests/ref/fate/maxis-xa +ffmpeg/tests/ref/fate/md5 +ffmpeg/tests/ref/fate/mdec +ffmpeg/tests/ref/fate/mdec-v3 +ffmpeg/tests/ref/fate/mimic +ffmpeg/tests/ref/fate/mjpegb +ffmpeg/tests/ref/fate/motionpixels +ffmpeg/tests/ref/fate/mpc7-demux +ffmpeg/tests/ref/fate/mpc8-demux +ffmpeg/tests/ref/fate/mpeg2-field-enc +ffmpeg/tests/ref/fate/mpeg4-als-conformance-00 +ffmpeg/tests/ref/fate/mpeg4-als-conformance-01 +ffmpeg/tests/ref/fate/mpeg4-als-conformance-02 +ffmpeg/tests/ref/fate/mpeg4-als-conformance-03 +ffmpeg/tests/ref/fate/mpeg4-als-conformance-04 +ffmpeg/tests/ref/fate/mpeg4-als-conformance-05 +ffmpeg/tests/ref/fate/msmpeg4v1 +ffmpeg/tests/ref/fate/msrle-8bit +ffmpeg/tests/ref/fate/msvideo1-16bit +ffmpeg/tests/ref/fate/msvideo1-8bit +ffmpeg/tests/ref/fate/mszh +ffmpeg/tests/ref/fate/mtv +ffmpeg/tests/ref/fate/mxf-demux +ffmpeg/tests/ref/fate/mxpeg +ffmpeg/tests/ref/fate/nc-demux +ffmpeg/tests/ref/fate/nistsphere-demux +ffmpeg/tests/ref/fate/noproxy +ffmpeg/tests/ref/fate/nsv-demux +ffmpeg/tests/ref/fate/nuv-rtjpeg +ffmpeg/tests/ref/fate/nuv-rtjpeg-fh +ffmpeg/tests/ref/fate/oma-demux +ffmpeg/tests/ref/fate/paf-audio +ffmpeg/tests/ref/fate/paf-demux +ffmpeg/tests/ref/fate/paf-video +ffmpeg/tests/ref/fate/parseutils +ffmpeg/tests/ref/fate/pcm-planar +ffmpeg/tests/ref/fate/pcm_dvd +ffmpeg/tests/ref/fate/pcm_s16be-stereo +ffmpeg/tests/ref/fate/pcm_s16le-stereo +ffmpeg/tests/ref/fate/pcm_u8-mono +ffmpeg/tests/ref/fate/pcm_u8-stereo +ffmpeg/tests/ref/fate/pictor +ffmpeg/tests/ref/fate/pmp-demux +ffmpeg/tests/ref/fate/prores-422 +ffmpeg/tests/ref/fate/prores-422_hq +ffmpeg/tests/ref/fate/prores-422_lt +ffmpeg/tests/ref/fate/prores-422_proxy +ffmpeg/tests/ref/fate/prores-alpha +ffmpeg/tests/ref/fate/psx-str-demux +ffmpeg/tests/ref/fate/ptx +ffmpeg/tests/ref/fate/pva-demux +ffmpeg/tests/ref/fate/qcp-demux +ffmpeg/tests/ref/fate/qpeg +ffmpeg/tests/ref/fate/qt-alaw-mono +ffmpeg/tests/ref/fate/qt-alaw-stereo +ffmpeg/tests/ref/fate/qt-ima4-mono +ffmpeg/tests/ref/fate/qt-ima4-stereo +ffmpeg/tests/ref/fate/qt-mac3-mono +ffmpeg/tests/ref/fate/qt-mac3-stereo +ffmpeg/tests/ref/fate/qt-mac6-mono +ffmpeg/tests/ref/fate/qt-mac6-stereo +ffmpeg/tests/ref/fate/qt-ulaw-mono +ffmpeg/tests/ref/fate/qt-ulaw-stereo +ffmpeg/tests/ref/fate/qtrle-16bit +ffmpeg/tests/ref/fate/qtrle-1bit +ffmpeg/tests/ref/fate/qtrle-24bit +ffmpeg/tests/ref/fate/qtrle-2bit +ffmpeg/tests/ref/fate/qtrle-32bit +ffmpeg/tests/ref/fate/qtrle-4bit +ffmpeg/tests/ref/fate/qtrle-8bit +ffmpeg/tests/ref/fate/quickdraw +ffmpeg/tests/ref/fate/r210 +ffmpeg/tests/ref/fate/ra-144 +ffmpeg/tests/ref/fate/ralf +ffmpeg/tests/ref/fate/random_seed +ffmpeg/tests/ref/fate/redcode-demux +ffmpeg/tests/ref/fate/rl2 +ffmpeg/tests/ref/fate/roqvideo +ffmpeg/tests/ref/fate/rpza +ffmpeg/tests/ref/fate/rv30 +ffmpeg/tests/ref/fate/rv40 +ffmpeg/tests/ref/fate/sanm +ffmpeg/tests/ref/fate/sha +ffmpeg/tests/ref/fate/sierra-vmd-audio +ffmpeg/tests/ref/fate/sierra-vmd-video +ffmpeg/tests/ref/fate/siff-demux +ffmpeg/tests/ref/fate/smacker-audio +ffmpeg/tests/ref/fate/smacker-video +ffmpeg/tests/ref/fate/smc +ffmpeg/tests/ref/fate/smjpeg +ffmpeg/tests/ref/fate/smjpeg-demux +ffmpeg/tests/ref/fate/sp5x +ffmpeg/tests/ref/fate/srtp +ffmpeg/tests/ref/fate/sub-aqtitle +ffmpeg/tests/ref/fate/sub-charenc +ffmpeg/tests/ref/fate/sub-jacosub +ffmpeg/tests/ref/fate/sub-microdvd +ffmpeg/tests/ref/fate/sub-microdvd-remux +ffmpeg/tests/ref/fate/sub-movtext +ffmpeg/tests/ref/fate/sub-movtextenc +ffmpeg/tests/ref/fate/sub-mpl2 +ffmpeg/tests/ref/fate/sub-mpsub +ffmpeg/tests/ref/fate/sub-mpsub-frames +ffmpeg/tests/ref/fate/sub-pjs +ffmpeg/tests/ref/fate/sub-realtext +ffmpeg/tests/ref/fate/sub-sami +ffmpeg/tests/ref/fate/sub-srt +ffmpeg/tests/ref/fate/sub-subripenc +ffmpeg/tests/ref/fate/sub-subviewer +ffmpeg/tests/ref/fate/sub-subviewer1 +ffmpeg/tests/ref/fate/sub-vplayer +ffmpeg/tests/ref/fate/sub-webvtt +ffmpeg/tests/ref/fate/sub2video +ffmpeg/tests/ref/fate/sunraster-1bit-raw +ffmpeg/tests/ref/fate/sunraster-1bit-rle +ffmpeg/tests/ref/fate/sunraster-24bit-raw +ffmpeg/tests/ref/fate/sunraster-24bit-rle +ffmpeg/tests/ref/fate/sunraster-8bit-raw +ffmpeg/tests/ref/fate/sunraster-8bit-rle +ffmpeg/tests/ref/fate/sunraster-8bit_gray-raw +ffmpeg/tests/ref/fate/svq1 +ffmpeg/tests/ref/fate/svq3 +ffmpeg/tests/ref/fate/targa-conformance-CBW8 +ffmpeg/tests/ref/fate/targa-conformance-CCM8 +ffmpeg/tests/ref/fate/targa-conformance-CTC16 +ffmpeg/tests/ref/fate/targa-conformance-CTC24 +ffmpeg/tests/ref/fate/targa-conformance-CTC32 +ffmpeg/tests/ref/fate/targa-conformance-UBW8 +ffmpeg/tests/ref/fate/targa-conformance-UCM8 +ffmpeg/tests/ref/fate/targa-conformance-UTC16 +ffmpeg/tests/ref/fate/targa-conformance-UTC24 +ffmpeg/tests/ref/fate/targa-conformance-UTC32 +ffmpeg/tests/ref/fate/targa-top-to-bottom +ffmpeg/tests/ref/fate/theora-coeff-level64 +ffmpeg/tests/ref/fate/thp +ffmpeg/tests/ref/fate/tiertex-seq +ffmpeg/tests/ref/fate/tiff-fax-g3 +ffmpeg/tests/ref/fate/tiff-fax-g3s +ffmpeg/tests/ref/fate/tmv +ffmpeg/tests/ref/fate/truemotion1-15 +ffmpeg/tests/ref/fate/truemotion1-24 +ffmpeg/tests/ref/fate/truemotion2 +ffmpeg/tests/ref/fate/tscc-15bit +ffmpeg/tests/ref/fate/tscc-32bit +ffmpeg/tests/ref/fate/txd-16bpp +ffmpeg/tests/ref/fate/txd-pal8 +ffmpeg/tests/ref/fate/ulti +ffmpeg/tests/ref/fate/url +ffmpeg/tests/ref/fate/utvideo_rgb_left +ffmpeg/tests/ref/fate/utvideo_rgb_median +ffmpeg/tests/ref/fate/utvideo_rgba_left +ffmpeg/tests/ref/fate/utvideo_rgba_median +ffmpeg/tests/ref/fate/utvideo_rgba_single_symbol +ffmpeg/tests/ref/fate/utvideo_yuv420_left +ffmpeg/tests/ref/fate/utvideo_yuv420_median +ffmpeg/tests/ref/fate/utvideo_yuv422_left +ffmpeg/tests/ref/fate/utvideo_yuv422_median +ffmpeg/tests/ref/fate/utvideoenc_rgb_left +ffmpeg/tests/ref/fate/utvideoenc_rgb_median +ffmpeg/tests/ref/fate/utvideoenc_rgb_none +ffmpeg/tests/ref/fate/utvideoenc_rgba_left +ffmpeg/tests/ref/fate/utvideoenc_rgba_median +ffmpeg/tests/ref/fate/utvideoenc_rgba_none +ffmpeg/tests/ref/fate/utvideoenc_yuv420_left +ffmpeg/tests/ref/fate/utvideoenc_yuv420_median +ffmpeg/tests/ref/fate/utvideoenc_yuv420_none +ffmpeg/tests/ref/fate/utvideoenc_yuv422_left +ffmpeg/tests/ref/fate/utvideoenc_yuv422_median +ffmpeg/tests/ref/fate/utvideoenc_yuv422_none +ffmpeg/tests/ref/fate/v210 +ffmpeg/tests/ref/fate/v410dec +ffmpeg/tests/ref/fate/v410enc +ffmpeg/tests/ref/fate/vb +ffmpeg/tests/ref/fate/vble +ffmpeg/tests/ref/fate/vc1-ism +ffmpeg/tests/ref/fate/vc1_sa00040 +ffmpeg/tests/ref/fate/vc1_sa00050 +ffmpeg/tests/ref/fate/vc1_sa10091 +ffmpeg/tests/ref/fate/vc1_sa10143 +ffmpeg/tests/ref/fate/vc1_sa20021 +ffmpeg/tests/ref/fate/vcr1 +ffmpeg/tests/ref/fate/videoxl +ffmpeg/tests/ref/fate/vima +ffmpeg/tests/ref/fate/vmnc-16bit +ffmpeg/tests/ref/fate/vmnc-32bit +ffmpeg/tests/ref/fate/vp31 +ffmpeg/tests/ref/fate/vp5 +ffmpeg/tests/ref/fate/vp60 +ffmpeg/tests/ref/fate/vp61 +ffmpeg/tests/ref/fate/vp6a +ffmpeg/tests/ref/fate/vp6f +ffmpeg/tests/ref/fate/vp8-alpha +ffmpeg/tests/ref/fate/vp8-sign-bias +ffmpeg/tests/ref/fate/vp8-size-change +ffmpeg/tests/ref/fate/vp8-test-vector-001 +ffmpeg/tests/ref/fate/vp8-test-vector-002 +ffmpeg/tests/ref/fate/vp8-test-vector-003 +ffmpeg/tests/ref/fate/vp8-test-vector-004 +ffmpeg/tests/ref/fate/vp8-test-vector-005 +ffmpeg/tests/ref/fate/vp8-test-vector-006 +ffmpeg/tests/ref/fate/vp8-test-vector-007 +ffmpeg/tests/ref/fate/vp8-test-vector-008 +ffmpeg/tests/ref/fate/vp8-test-vector-009 +ffmpeg/tests/ref/fate/vp8-test-vector-010 +ffmpeg/tests/ref/fate/vp8-test-vector-011 +ffmpeg/tests/ref/fate/vp8-test-vector-012 +ffmpeg/tests/ref/fate/vp8-test-vector-013 +ffmpeg/tests/ref/fate/vp8-test-vector-014 +ffmpeg/tests/ref/fate/vp8-test-vector-015 +ffmpeg/tests/ref/fate/vp8-test-vector-016 +ffmpeg/tests/ref/fate/vp8-test-vector-017 +ffmpeg/tests/ref/fate/vqa-cc +ffmpeg/tests/ref/fate/vqf-demux +ffmpeg/tests/ref/fate/w64 +ffmpeg/tests/ref/fate/wavpack-channels-4.0 +ffmpeg/tests/ref/fate/wavpack-channels-5.1 +ffmpeg/tests/ref/fate/wavpack-channels-6.1 +ffmpeg/tests/ref/fate/wavpack-channels-7.1 +ffmpeg/tests/ref/fate/wavpack-channels-monofloat +ffmpeg/tests/ref/fate/wavpack-channels-monoint +ffmpeg/tests/ref/fate/wavpack-clipping +ffmpeg/tests/ref/fate/wavpack-cuesheet +ffmpeg/tests/ref/fate/wavpack-falsestereo +ffmpeg/tests/ref/fate/wavpack-lossless-12bit +ffmpeg/tests/ref/fate/wavpack-lossless-16bit +ffmpeg/tests/ref/fate/wavpack-lossless-24bit +ffmpeg/tests/ref/fate/wavpack-lossless-32bit +ffmpeg/tests/ref/fate/wavpack-lossless-8bit +ffmpeg/tests/ref/fate/wavpack-lossless-float +ffmpeg/tests/ref/fate/wavpack-lossy-16bit +ffmpeg/tests/ref/fate/wavpack-lossy-24bit +ffmpeg/tests/ref/fate/wavpack-lossy-32bit +ffmpeg/tests/ref/fate/wavpack-lossy-8bit +ffmpeg/tests/ref/fate/wavpack-lossy-float +ffmpeg/tests/ref/fate/wavpack-matroskamode +ffmpeg/tests/ref/fate/wavpack-speed-default +ffmpeg/tests/ref/fate/wavpack-speed-fast +ffmpeg/tests/ref/fate/wavpack-speed-high +ffmpeg/tests/ref/fate/wavpack-speed-vhigh +ffmpeg/tests/ref/fate/wavpack-zerolsbs +ffmpeg/tests/ref/fate/wc3movie-xan +ffmpeg/tests/ref/fate/westwood-aud +ffmpeg/tests/ref/fate/wmv8-drm +ffmpeg/tests/ref/fate/wmv8-drm-nodec +ffmpeg/tests/ref/fate/wmv8-x8intra +ffmpeg/tests/ref/fate/wnv1 +ffmpeg/tests/ref/fate/ws_snd +ffmpeg/tests/ref/fate/wtv-demux +ffmpeg/tests/ref/fate/xface +ffmpeg/tests/ref/fate/xmv-demux +ffmpeg/tests/ref/fate/xtea +ffmpeg/tests/ref/fate/xwma-demux +ffmpeg/tests/ref/fate/xxan-wc4 +ffmpeg/tests/ref/fate/yop +ffmpeg/tests/ref/fate/zerocodec +ffmpeg/tests/ref/fate/zlib +ffmpeg/tests/ref/fate/zmbv-15bit +ffmpeg/tests/ref/fate/zmbv-16bit +ffmpeg/tests/ref/fate/zmbv-32bit +ffmpeg/tests/ref/fate/zmbv-8bit +ffmpeg/tests/ref/lavf-fate/latm +ffmpeg/tests/ref/lavf-fate/mp3 +ffmpeg/tests/ref/lavf-fate/ogg_vp3 +ffmpeg/tests/ref/lavf/aiff +ffmpeg/tests/ref/lavf/alaw +ffmpeg/tests/ref/lavf/asf +ffmpeg/tests/ref/lavf/ast +ffmpeg/tests/ref/lavf/au +ffmpeg/tests/ref/lavf/avi +ffmpeg/tests/ref/lavf/bmp +ffmpeg/tests/ref/lavf/caf +ffmpeg/tests/ref/lavf/dpx +ffmpeg/tests/ref/lavf/dv_fmt +ffmpeg/tests/ref/lavf/ffm +ffmpeg/tests/ref/lavf/flm +ffmpeg/tests/ref/lavf/flv_fmt +ffmpeg/tests/ref/lavf/gif +ffmpeg/tests/ref/lavf/gxf +ffmpeg/tests/ref/lavf/ircam +ffmpeg/tests/ref/lavf/ismv +ffmpeg/tests/ref/lavf/jpg +ffmpeg/tests/ref/lavf/mkv +ffmpeg/tests/ref/lavf/mmf +ffmpeg/tests/ref/lavf/mov +ffmpeg/tests/ref/lavf/mpg +ffmpeg/tests/ref/lavf/mulaw +ffmpeg/tests/ref/lavf/mxf +ffmpeg/tests/ref/lavf/mxf_d10 +ffmpeg/tests/ref/lavf/nut +ffmpeg/tests/ref/lavf/ogg +ffmpeg/tests/ref/lavf/pam +ffmpeg/tests/ref/lavf/pbmpipe +ffmpeg/tests/ref/lavf/pcx +ffmpeg/tests/ref/lavf/pgm +ffmpeg/tests/ref/lavf/pgmpipe +ffmpeg/tests/ref/lavf/pixfmt +ffmpeg/tests/ref/lavf/png +ffmpeg/tests/ref/lavf/ppm +ffmpeg/tests/ref/lavf/ppmpipe +ffmpeg/tests/ref/lavf/rm +ffmpeg/tests/ref/lavf/rso +ffmpeg/tests/ref/lavf/sgi +ffmpeg/tests/ref/lavf/smjpeg +ffmpeg/tests/ref/lavf/sox +ffmpeg/tests/ref/lavf/sunrast +ffmpeg/tests/ref/lavf/swf +ffmpeg/tests/ref/lavf/tga +ffmpeg/tests/ref/lavf/tiff +ffmpeg/tests/ref/lavf/ts +ffmpeg/tests/ref/lavf/voc +ffmpeg/tests/ref/lavf/voc_s16 +ffmpeg/tests/ref/lavf/w64 +ffmpeg/tests/ref/lavf/wav +ffmpeg/tests/ref/lavf/wtv +ffmpeg/tests/ref/lavf/xbm +ffmpeg/tests/ref/lavf/xwd +ffmpeg/tests/ref/lavf/yuv4mpeg +ffmpeg/tests/ref/lavfi/alphaextract_rgb +ffmpeg/tests/ref/lavfi/alphaextract_yuv +ffmpeg/tests/ref/lavfi/alphamerge_rgb +ffmpeg/tests/ref/lavfi/alphamerge_yuv +ffmpeg/tests/ref/lavfi/colormatrix1 +ffmpeg/tests/ref/lavfi/colormatrix2 +ffmpeg/tests/ref/lavfi/crop +ffmpeg/tests/ref/lavfi/crop_scale +ffmpeg/tests/ref/lavfi/crop_scale_vflip +ffmpeg/tests/ref/lavfi/crop_vflip +ffmpeg/tests/ref/lavfi/drawbox +ffmpeg/tests/ref/lavfi/edgedetect +ffmpeg/tests/ref/lavfi/fade +ffmpeg/tests/ref/lavfi/field +ffmpeg/tests/ref/lavfi/histeq +ffmpeg/tests/ref/lavfi/hue +ffmpeg/tests/ref/lavfi/idet +ffmpeg/tests/ref/lavfi/il +ffmpeg/tests/ref/lavfi/kerndeint +ffmpeg/tests/ref/lavfi/life +ffmpeg/tests/ref/lavfi/null +ffmpeg/tests/ref/lavfi/overlay_rgb +ffmpeg/tests/ref/lavfi/overlay_yuv420 +ffmpeg/tests/ref/lavfi/overlay_yuv444 +ffmpeg/tests/ref/lavfi/pad +ffmpeg/tests/ref/lavfi/pixfmts_copy +ffmpeg/tests/ref/lavfi/pixfmts_crop +ffmpeg/tests/ref/lavfi/pixfmts_hflip +ffmpeg/tests/ref/lavfi/pixfmts_null +ffmpeg/tests/ref/lavfi/pixfmts_pad +ffmpeg/tests/ref/lavfi/pixfmts_pixdesctest +ffmpeg/tests/ref/lavfi/pixfmts_scale +ffmpeg/tests/ref/lavfi/pixfmts_super2xsai +ffmpeg/tests/ref/lavfi/pixfmts_vflip +ffmpeg/tests/ref/lavfi/pp +ffmpeg/tests/ref/lavfi/pp2 +ffmpeg/tests/ref/lavfi/pp3 +ffmpeg/tests/ref/lavfi/pp4 +ffmpeg/tests/ref/lavfi/pp5 +ffmpeg/tests/ref/lavfi/pp6 +ffmpeg/tests/ref/lavfi/scale200 +ffmpeg/tests/ref/lavfi/scale500 +ffmpeg/tests/ref/lavfi/scalenorm +ffmpeg/tests/ref/lavfi/select +ffmpeg/tests/ref/lavfi/setdar +ffmpeg/tests/ref/lavfi/setsar +ffmpeg/tests/ref/lavfi/testsrc +ffmpeg/tests/ref/lavfi/thumbnail +ffmpeg/tests/ref/lavfi/tile +ffmpeg/tests/ref/lavfi/tinterlace_merge +ffmpeg/tests/ref/lavfi/tinterlace_pad +ffmpeg/tests/ref/lavfi/transpose +ffmpeg/tests/ref/lavfi/unsharp +ffmpeg/tests/ref/lavfi/vflip +ffmpeg/tests/ref/lavfi/vflip_crop +ffmpeg/tests/ref/lavfi/vflip_vflip +ffmpeg/tests/ref/seek/acodec-adpcm-ima_qt +ffmpeg/tests/ref/seek/acodec-adpcm-ima_wav +ffmpeg/tests/ref/seek/acodec-adpcm-ms +ffmpeg/tests/ref/seek/acodec-adpcm-swf +ffmpeg/tests/ref/seek/acodec-adpcm-yamaha +ffmpeg/tests/ref/seek/acodec-alac +ffmpeg/tests/ref/seek/acodec-flac +ffmpeg/tests/ref/seek/acodec-mp2 +ffmpeg/tests/ref/seek/acodec-pcm-alaw +ffmpeg/tests/ref/seek/acodec-pcm-f32be +ffmpeg/tests/ref/seek/acodec-pcm-f32le +ffmpeg/tests/ref/seek/acodec-pcm-f64be +ffmpeg/tests/ref/seek/acodec-pcm-f64le +ffmpeg/tests/ref/seek/acodec-pcm-mulaw +ffmpeg/tests/ref/seek/acodec-pcm-s16be +ffmpeg/tests/ref/seek/acodec-pcm-s16le +ffmpeg/tests/ref/seek/acodec-pcm-s24be +ffmpeg/tests/ref/seek/acodec-pcm-s24le +ffmpeg/tests/ref/seek/acodec-pcm-s32be +ffmpeg/tests/ref/seek/acodec-pcm-s32le +ffmpeg/tests/ref/seek/acodec-pcm-s8 +ffmpeg/tests/ref/seek/acodec-pcm-u8 +ffmpeg/tests/ref/seek/lavf-aiff +ffmpeg/tests/ref/seek/lavf-alaw +ffmpeg/tests/ref/seek/lavf-asf +ffmpeg/tests/ref/seek/lavf-au +ffmpeg/tests/ref/seek/lavf-avi +ffmpeg/tests/ref/seek/lavf-bmp +ffmpeg/tests/ref/seek/lavf-dv_fmt +ffmpeg/tests/ref/seek/lavf-ffm +ffmpeg/tests/ref/seek/lavf-flv_fmt +ffmpeg/tests/ref/seek/lavf-gif +ffmpeg/tests/ref/seek/lavf-gxf +ffmpeg/tests/ref/seek/lavf-jpg +ffmpeg/tests/ref/seek/lavf-mkv +ffmpeg/tests/ref/seek/lavf-mmf +ffmpeg/tests/ref/seek/lavf-mov +ffmpeg/tests/ref/seek/lavf-mpg +ffmpeg/tests/ref/seek/lavf-mulaw +ffmpeg/tests/ref/seek/lavf-mxf +ffmpeg/tests/ref/seek/lavf-mxf_d10 +ffmpeg/tests/ref/seek/lavf-nut +ffmpeg/tests/ref/seek/lavf-ogg +ffmpeg/tests/ref/seek/lavf-pbmpipe +ffmpeg/tests/ref/seek/lavf-pcx +ffmpeg/tests/ref/seek/lavf-pgm +ffmpeg/tests/ref/seek/lavf-pgmpipe +ffmpeg/tests/ref/seek/lavf-ppm +ffmpeg/tests/ref/seek/lavf-ppmpipe +ffmpeg/tests/ref/seek/lavf-rm +ffmpeg/tests/ref/seek/lavf-sgi +ffmpeg/tests/ref/seek/lavf-swf +ffmpeg/tests/ref/seek/lavf-tga +ffmpeg/tests/ref/seek/lavf-tiff +ffmpeg/tests/ref/seek/lavf-ts +ffmpeg/tests/ref/seek/lavf-voc +ffmpeg/tests/ref/seek/lavf-wav +ffmpeg/tests/ref/seek/lavf-wtv +ffmpeg/tests/ref/seek/lavf-yuv4mpeg +ffmpeg/tests/ref/seek/vsynth2-asv1 +ffmpeg/tests/ref/seek/vsynth2-asv2 +ffmpeg/tests/ref/seek/vsynth2-dnxhd-1080i +ffmpeg/tests/ref/seek/vsynth2-dnxhd-720p +ffmpeg/tests/ref/seek/vsynth2-dnxhd-720p-rd +ffmpeg/tests/ref/seek/vsynth2-dv +ffmpeg/tests/ref/seek/vsynth2-dv-411 +ffmpeg/tests/ref/seek/vsynth2-dv-50 +ffmpeg/tests/ref/seek/vsynth2-ffv1 +ffmpeg/tests/ref/seek/vsynth2-flashsv +ffmpeg/tests/ref/seek/vsynth2-flv +ffmpeg/tests/ref/seek/vsynth2-h261 +ffmpeg/tests/ref/seek/vsynth2-h263 +ffmpeg/tests/ref/seek/vsynth2-h263p +ffmpeg/tests/ref/seek/vsynth2-huffyuv +ffmpeg/tests/ref/seek/vsynth2-jpegls +ffmpeg/tests/ref/seek/vsynth2-ljpeg +ffmpeg/tests/ref/seek/vsynth2-mjpeg +ffmpeg/tests/ref/seek/vsynth2-mpeg1 +ffmpeg/tests/ref/seek/vsynth2-mpeg1b +ffmpeg/tests/ref/seek/vsynth2-mpeg2-422 +ffmpeg/tests/ref/seek/vsynth2-mpeg2-idct-int +ffmpeg/tests/ref/seek/vsynth2-mpeg2-ilace +ffmpeg/tests/ref/seek/vsynth2-mpeg2-ivlc-qprd +ffmpeg/tests/ref/seek/vsynth2-mpeg2-thread +ffmpeg/tests/ref/seek/vsynth2-mpeg2-thread-ivlc +ffmpeg/tests/ref/seek/vsynth2-mpeg4 +ffmpeg/tests/ref/seek/vsynth2-mpeg4-adap +ffmpeg/tests/ref/seek/vsynth2-mpeg4-adv +ffmpeg/tests/ref/seek/vsynth2-mpeg4-error +ffmpeg/tests/ref/seek/vsynth2-mpeg4-nr +ffmpeg/tests/ref/seek/vsynth2-mpeg4-qpel +ffmpeg/tests/ref/seek/vsynth2-mpeg4-qprd +ffmpeg/tests/ref/seek/vsynth2-mpeg4-rc +ffmpeg/tests/ref/seek/vsynth2-mpeg4-thread +ffmpeg/tests/ref/seek/vsynth2-msmpeg4 +ffmpeg/tests/ref/seek/vsynth2-msmpeg4v2 +ffmpeg/tests/ref/seek/vsynth2-rgb +ffmpeg/tests/ref/seek/vsynth2-roqvideo +ffmpeg/tests/ref/seek/vsynth2-rv10 +ffmpeg/tests/ref/seek/vsynth2-rv20 +ffmpeg/tests/ref/seek/vsynth2-snow +ffmpeg/tests/ref/seek/vsynth2-snow-ll +ffmpeg/tests/ref/seek/vsynth2-svq1 +ffmpeg/tests/ref/seek/vsynth2-wmv1 +ffmpeg/tests/ref/seek/vsynth2-wmv2 +ffmpeg/tests/ref/seek/vsynth2-yuv +ffmpeg/tests/ref/vsynth/vsynth1-amv +ffmpeg/tests/ref/vsynth/vsynth1-asv1 +ffmpeg/tests/ref/vsynth/vsynth1-asv2 +ffmpeg/tests/ref/vsynth/vsynth1-avui +ffmpeg/tests/ref/vsynth/vsynth1-cljr +ffmpeg/tests/ref/vsynth/vsynth1-dnxhd-1080i +ffmpeg/tests/ref/vsynth/vsynth1-dnxhd-720p +ffmpeg/tests/ref/vsynth/vsynth1-dnxhd-720p-10bit +ffmpeg/tests/ref/vsynth/vsynth1-dnxhd-720p-rd +ffmpeg/tests/ref/vsynth/vsynth1-dnxhd_1080i +ffmpeg/tests/ref/vsynth/vsynth1-dv +ffmpeg/tests/ref/vsynth/vsynth1-dv-411 +ffmpeg/tests/ref/vsynth/vsynth1-dv-50 +ffmpeg/tests/ref/vsynth/vsynth1-dv_411 +ffmpeg/tests/ref/vsynth/vsynth1-ffv1 +ffmpeg/tests/ref/vsynth/vsynth1-ffvhuff +ffmpeg/tests/ref/vsynth/vsynth1-flashsv +ffmpeg/tests/ref/vsynth/vsynth1-flashsv2 +ffmpeg/tests/ref/vsynth/vsynth1-flv +ffmpeg/tests/ref/vsynth/vsynth1-h261 +ffmpeg/tests/ref/vsynth/vsynth1-h263 +ffmpeg/tests/ref/vsynth/vsynth1-h263-obmc +ffmpeg/tests/ref/vsynth/vsynth1-h263p +ffmpeg/tests/ref/vsynth/vsynth1-huffyuv +ffmpeg/tests/ref/vsynth/vsynth1-j2k +ffmpeg/tests/ref/vsynth/vsynth1-jpegls +ffmpeg/tests/ref/vsynth/vsynth1-ljpeg +ffmpeg/tests/ref/vsynth/vsynth1-mjpeg +ffmpeg/tests/ref/vsynth/vsynth1-mjpeg-422 +ffmpeg/tests/ref/vsynth/vsynth1-mjpeg-444 +ffmpeg/tests/ref/vsynth/vsynth1-mpeg1 +ffmpeg/tests/ref/vsynth/vsynth1-mpeg1b +ffmpeg/tests/ref/vsynth/vsynth1-mpeg2 +ffmpeg/tests/ref/vsynth/vsynth1-mpeg2-422 +ffmpeg/tests/ref/vsynth/vsynth1-mpeg2-idct-int +ffmpeg/tests/ref/vsynth/vsynth1-mpeg2-ilace +ffmpeg/tests/ref/vsynth/vsynth1-mpeg2-ivlc-qprd +ffmpeg/tests/ref/vsynth/vsynth1-mpeg2-thread +ffmpeg/tests/ref/vsynth/vsynth1-mpeg2-thread-ivlc +ffmpeg/tests/ref/vsynth/vsynth1-mpeg4 +ffmpeg/tests/ref/vsynth/vsynth1-mpeg4-adap +ffmpeg/tests/ref/vsynth/vsynth1-mpeg4-adv +ffmpeg/tests/ref/vsynth/vsynth1-mpeg4-error +ffmpeg/tests/ref/vsynth/vsynth1-mpeg4-nr +ffmpeg/tests/ref/vsynth/vsynth1-mpeg4-qpel +ffmpeg/tests/ref/vsynth/vsynth1-mpeg4-qprd +ffmpeg/tests/ref/vsynth/vsynth1-mpeg4-rc +ffmpeg/tests/ref/vsynth/vsynth1-mpeg4-thread +ffmpeg/tests/ref/vsynth/vsynth1-mpng +ffmpeg/tests/ref/vsynth/vsynth1-msmpeg4 +ffmpeg/tests/ref/vsynth/vsynth1-msmpeg4v2 +ffmpeg/tests/ref/vsynth/vsynth1-msvideo1 +ffmpeg/tests/ref/vsynth/vsynth1-prores +ffmpeg/tests/ref/vsynth/vsynth1-prores_kostya +ffmpeg/tests/ref/vsynth/vsynth1-qtrle +ffmpeg/tests/ref/vsynth/vsynth1-qtrlegray +ffmpeg/tests/ref/vsynth/vsynth1-r210 +ffmpeg/tests/ref/vsynth/vsynth1-rgb +ffmpeg/tests/ref/vsynth/vsynth1-roqvideo +ffmpeg/tests/ref/vsynth/vsynth1-rv10 +ffmpeg/tests/ref/vsynth/vsynth1-rv20 +ffmpeg/tests/ref/vsynth/vsynth1-snow +ffmpeg/tests/ref/vsynth/vsynth1-snow-hpel +ffmpeg/tests/ref/vsynth/vsynth1-snow-ll +ffmpeg/tests/ref/vsynth/vsynth1-svq1 +ffmpeg/tests/ref/vsynth/vsynth1-v210 +ffmpeg/tests/ref/vsynth/vsynth1-v308 +ffmpeg/tests/ref/vsynth/vsynth1-v408 +ffmpeg/tests/ref/vsynth/vsynth1-wmv1 +ffmpeg/tests/ref/vsynth/vsynth1-wmv2 +ffmpeg/tests/ref/vsynth/vsynth1-y41p +ffmpeg/tests/ref/vsynth/vsynth1-yuv +ffmpeg/tests/ref/vsynth/vsynth1-yuv4 +ffmpeg/tests/ref/vsynth/vsynth1-zlib +ffmpeg/tests/ref/vsynth/vsynth1-zmbv +ffmpeg/tests/ref/vsynth/vsynth2-amv +ffmpeg/tests/ref/vsynth/vsynth2-asv1 +ffmpeg/tests/ref/vsynth/vsynth2-asv2 +ffmpeg/tests/ref/vsynth/vsynth2-avui +ffmpeg/tests/ref/vsynth/vsynth2-cljr +ffmpeg/tests/ref/vsynth/vsynth2-dnxhd-1080i +ffmpeg/tests/ref/vsynth/vsynth2-dnxhd-720p +ffmpeg/tests/ref/vsynth/vsynth2-dnxhd-720p-10bit +ffmpeg/tests/ref/vsynth/vsynth2-dnxhd-720p-rd +ffmpeg/tests/ref/vsynth/vsynth2-dnxhd_1080i +ffmpeg/tests/ref/vsynth/vsynth2-dv +ffmpeg/tests/ref/vsynth/vsynth2-dv-411 +ffmpeg/tests/ref/vsynth/vsynth2-dv-50 +ffmpeg/tests/ref/vsynth/vsynth2-dv_411 +ffmpeg/tests/ref/vsynth/vsynth2-ffv1 +ffmpeg/tests/ref/vsynth/vsynth2-ffvhuff +ffmpeg/tests/ref/vsynth/vsynth2-flashsv +ffmpeg/tests/ref/vsynth/vsynth2-flashsv2 +ffmpeg/tests/ref/vsynth/vsynth2-flv +ffmpeg/tests/ref/vsynth/vsynth2-h261 +ffmpeg/tests/ref/vsynth/vsynth2-h263 +ffmpeg/tests/ref/vsynth/vsynth2-h263-obmc +ffmpeg/tests/ref/vsynth/vsynth2-h263p +ffmpeg/tests/ref/vsynth/vsynth2-huffyuv +ffmpeg/tests/ref/vsynth/vsynth2-j2k +ffmpeg/tests/ref/vsynth/vsynth2-jpegls +ffmpeg/tests/ref/vsynth/vsynth2-ljpeg +ffmpeg/tests/ref/vsynth/vsynth2-mjpeg +ffmpeg/tests/ref/vsynth/vsynth2-mjpeg-422 +ffmpeg/tests/ref/vsynth/vsynth2-mjpeg-444 +ffmpeg/tests/ref/vsynth/vsynth2-mpeg1 +ffmpeg/tests/ref/vsynth/vsynth2-mpeg1b +ffmpeg/tests/ref/vsynth/vsynth2-mpeg2 +ffmpeg/tests/ref/vsynth/vsynth2-mpeg2-422 +ffmpeg/tests/ref/vsynth/vsynth2-mpeg2-idct-int +ffmpeg/tests/ref/vsynth/vsynth2-mpeg2-ilace +ffmpeg/tests/ref/vsynth/vsynth2-mpeg2-ivlc-qprd +ffmpeg/tests/ref/vsynth/vsynth2-mpeg2-thread +ffmpeg/tests/ref/vsynth/vsynth2-mpeg2-thread-ivlc +ffmpeg/tests/ref/vsynth/vsynth2-mpeg4 +ffmpeg/tests/ref/vsynth/vsynth2-mpeg4-adap +ffmpeg/tests/ref/vsynth/vsynth2-mpeg4-adv +ffmpeg/tests/ref/vsynth/vsynth2-mpeg4-error +ffmpeg/tests/ref/vsynth/vsynth2-mpeg4-nr +ffmpeg/tests/ref/vsynth/vsynth2-mpeg4-qpel +ffmpeg/tests/ref/vsynth/vsynth2-mpeg4-qprd +ffmpeg/tests/ref/vsynth/vsynth2-mpeg4-rc +ffmpeg/tests/ref/vsynth/vsynth2-mpeg4-thread +ffmpeg/tests/ref/vsynth/vsynth2-mpng +ffmpeg/tests/ref/vsynth/vsynth2-msmpeg4 +ffmpeg/tests/ref/vsynth/vsynth2-msmpeg4v2 +ffmpeg/tests/ref/vsynth/vsynth2-msvideo1 +ffmpeg/tests/ref/vsynth/vsynth2-prores +ffmpeg/tests/ref/vsynth/vsynth2-prores_kostya +ffmpeg/tests/ref/vsynth/vsynth2-qtrle +ffmpeg/tests/ref/vsynth/vsynth2-qtrlegray +ffmpeg/tests/ref/vsynth/vsynth2-r210 +ffmpeg/tests/ref/vsynth/vsynth2-rgb +ffmpeg/tests/ref/vsynth/vsynth2-roqvideo +ffmpeg/tests/ref/vsynth/vsynth2-rv10 +ffmpeg/tests/ref/vsynth/vsynth2-rv20 +ffmpeg/tests/ref/vsynth/vsynth2-snow +ffmpeg/tests/ref/vsynth/vsynth2-snow-hpel +ffmpeg/tests/ref/vsynth/vsynth2-snow-ll +ffmpeg/tests/ref/vsynth/vsynth2-svq1 +ffmpeg/tests/ref/vsynth/vsynth2-v210 +ffmpeg/tests/ref/vsynth/vsynth2-v308 +ffmpeg/tests/ref/vsynth/vsynth2-v408 +ffmpeg/tests/ref/vsynth/vsynth2-wmv1 +ffmpeg/tests/ref/vsynth/vsynth2-wmv2 +ffmpeg/tests/ref/vsynth/vsynth2-y41p +ffmpeg/tests/ref/vsynth/vsynth2-yuv +ffmpeg/tests/ref/vsynth/vsynth2-yuv4 +ffmpeg/tests/ref/vsynth/vsynth2-zlib +ffmpeg/tests/ref/vsynth/vsynth2-zmbv +ffmpeg/tests/ref/vsynth1/cljr +ffmpeg/tests/ref/vsynth1/yuv +ffmpeg/tests/ref/vsynth2/cljr +ffmpeg/tests/ref/vsynth2/huffyuv +ffmpeg/tests/ref/vsynth2/yuv +ffmpeg/tests/regression-funcs.sh +ffmpeg/tests/rotozoom.c +ffmpeg/tests/test.ffmeta +ffmpeg/tests/tiny_psnr.c +ffmpeg/tests/utils.c +ffmpeg/tests/videogen.c +ffmpeg/tools/aviocat.c +ffmpeg/tools/bisect-create +ffmpeg/tools/bookmarklets.html +ffmpeg/tools/build_libstagefright +ffmpeg/tools/clean-diff +ffmpeg/tools/cws2fws.c +ffmpeg/tools/enum_options.c +ffmpeg/tools/ffescape.c +ffmpeg/tools/ffeval.c +ffmpeg/tools/fourcc2pixfmt.c +ffmpeg/tools/graph2dot.c +ffmpeg/tools/ismindex.c +ffmpeg/tools/make_chlayout_test +ffmpeg/tools/missing_codec_desc +ffmpeg/tools/patcheck +ffmpeg/tools/pktdumper.c +ffmpeg/tools/plotframes +ffmpeg/tools/probetest.c +ffmpeg/tools/qt-faststart.c +ffmpeg/tools/seek_print.c +ffmpeg/tools/trasher.c +ffmpeg/tools/unwrap-diff +ffmpeg/tools/yuvcmp.c +ffmpeg/version.sh + +commit 19df260 +Author: hiroyuki nagata +Date: 2013-11-17 + + Delete empty ffmpeg directory. + +ffmpeg + +commit 9daf10b +Author: hiroyuki nagata +Date: 2013-11-17 + + Add Japanese AutoConvert comskip.ini. + +misc/comskip.ini + +commit 1f9ac6f +Author: hiroyuki nagata +Date: 2013-11-16 + + Fix sleep behavior when ffmpeg return code is ERROR. + +Makefile.am +comskip.c +config.h.in +configure +configure.ac +mpeg2dec.c + +commit c89dfb0 +Author: hiroyuki nagata +Date: 2013-11-16 + + Change configuration of comskip project. + +COPYING +INSTALL +LICENSE +compile +config.guess +config.h +config.sub +depcomp +install-sh +missing + +commit 9a05578 +Author: hiroyuki nagata +Date: 2013-11-16 + + Remove stubs. + +comskip.c + +commit af7e91b +Author: hiroyuki nagata +Date: 2013-11-16 + + Compile and link comskip with Linux. ( some stub exists.) + +Makefile.am +comskip.c +configure +configure.ac +mpeg2dec.c + +commit c13034a +Author: hiroyuki nagata +Date: 2013-11-16 + + Compile mpeg2dec.c with Linux. Modify configure.ac. + +comskip.c +comskip.h +config.h.in +configure +configure.ac +mpeg2dec.c + +commit 7a782f1 +Author: hiroyuki nagata +Date: 2013-11-14 + + Compile comskip.c with Linux. + +COPYING +Makefile.am +comskip.c +comskip.h +config.h.in +configure +configure.ac + +commit e5c6e00 +Author: hiroyuki nagata +Date: 2013-11-14 + + Autotoolize comskip project + +.gitignore +.gitmodules +AUTHORS +ChangeLog +INSTALL +Makefile +Makefile.am +NEWS +aclocal.m4 +bootstrap +compile +config.guess +config.h.in +config.sub +configure +configure.ac +depcomp +ffmpeg +install-sh +missing +win32/Makefile.win32 + +commit 1b0df07 +Author: Michael Mohr +Date: 2013-10-26 + + add a compatibility section to the application manifests + +README +comskip32.manifest +comskip64.manifest + +commit c2344b1 +Author: Michael Mohr +Date: 2013-10-25 + + add a basic manifest + +comskip.rc +comskip32.manifest +comskip64.manifest + +commit c07a708 +Author: Michael Mohr +Date: 2013-10-24 + + first stab at 64-bit support + +Makefile +mpeg2dec.c +video_out_dx.c + +commit 8d40f6b +Author: Michael Mohr +Date: 2013-09-21 + + minor build changes + +Makefile + +commit e57acbd +Author: Michael Mohr +Date: 2013-09-19 + + fix warnings from gcc + +comskip.c + +commit 584570e +Author: Michael Mohr +Date: 2013-09-04 + + readme and license do not contain markdown + +LICENSE +LICENSE.md +README +README.md + +commit caca353 +Author: Michael Mohr +Date: 2013-09-04 + + add missing license file + +LICENSE.md + +commit a11e66d +Author: Michael Mohr +Date: 2013-09-04 + + Add readme and ffmpeg patch + +README.md +contrib/ffmpeg-unicode.patch + +commit b0f12a6 +Author: Michael Mohr +Date: 2013-09-03 + + Move gettimeofday() function declaration into mpeg2dec.c + +Makefile +gettimeofday.c +gettimeofday.h +mpeg2dec.c + +commit 656cc38 +Author: Michael Mohr +Date: 2013-09-02 + + getopt is provided by libmingwex.a + +Makefile +getopt.c +getopt.h + +commit dae4582 +Author: Michael Mohr +Date: 2013-09-01 + + * Fix myfopen function prototype and declaration + * Use ddraw.h from MinGW (to avoid using Microsoft code) + * Add Makefile and resource definitions + +Makefile +comskip.c +comskip.rc +video_out_dx.c + +commit c45d2c8 +Author: Michael Mohr +Date: 2013-08-31 + + Import Comskip 0.81.056 (upstream SVN rev 55) + +comskip.c +comskip.h +comskip16.ico +comskip32.ico +config.h +getopt.c +getopt.h +gettimeofday.c +gettimeofday.h +mpeg2dec.c +resource.h +video_out_dx.c diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..32c4b65 --- /dev/null +++ b/INSTALL @@ -0,0 +1,31 @@ +********************************************* +comskip ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«æ–¹æ³•(ä»®) +(comskip Installation Instructions (temporary)) +********************************************* + +Copyright (C) 2014 Hiroyuki Nagata + + Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. + +基本インストール +(Basic Install) +================== + + $ git clone https://github.com/Hiroyuki-Nagata/comskip.git + $ cd path/to/comskip/ + $ git submodule init + $ git submodule update + $ ./bootstrap + + # Move ffmpeg directory and build + $ cd ffmpeg + $ ./configure --enable-gpl --enable-version3 --disable-stripping --enable-libx264 --enable-shared + $ make && make install + + # Build comskip + $ cd ../ + $ ./configure + $ make \ No newline at end of file diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..a89de0f --- /dev/null +++ b/Makefile.am @@ -0,0 +1,17 @@ +# ChangeLog +dist-hook: changelog + +# configure.ac +changelog: configure.ac + git log --stat --name-only --date=short --abbrev-commit > ChangeLog + +# install directory +bin_PROGRAMS = comskip + +# sources +comskip_SOURCES = comskip.c mpeg2dec.c video_out_dx.c comskip.h + +# common build rule +comskip_CFLAGS = @CFLAGS@ -Wno-deprecated-declarations -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +comskip_LDADD = -lavformat -lavcodec -lavutil +ACLOCAL_AMFLAGS = -I m4 diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/README b/README index 9ad57c2..57f9342 100644 --- a/README +++ b/README @@ -34,8 +34,4 @@ git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg cd ffmpeg git checkout -b comskip n1.2.3 patch -p1 < ../ffmpeg-unicode.patch -./configure --arch=x86 --target-os=mingw32 --cross-prefix=i686-w64-mingw32- --enable-gpl --enable-version3 --disable-stripping --enable-libx264 --disable-shared --enable-static - -== argtable2 == - -./configure --prefix=/usr --sysconfdir=/etc --build=x86_64-unknown-linux-gnu --host=i686-w64-mingw32 --enable-static --disable-shared +./configure --arch=x86 --target-os=mingw32 --cross-prefix=i686-w64-mingw32- --enable-gpl --enable-version3 --disable-stripping --enable-libx264 --disable-shared --enable-static \ No newline at end of file diff --git a/bootstrap b/bootstrap new file mode 100755 index 0000000..833d25d --- /dev/null +++ b/bootstrap @@ -0,0 +1,8 @@ +#!/bin/sh + +# create m4 dir +if ! test -d m4; then + mkdir m4; +fi +# exec autoreconf +autoreconf -vi diff --git a/comskip.c b/comskip.c index 960dfe2..3eea6f7 100644 --- a/comskip.c +++ b/comskip.c @@ -12,77 +12,96 @@ // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -#include + #ifdef _WIN32 +#include #include -#include // needed for sleep command -#include // needed for getcwd +#include // needed for sleep command +#include // needed for getcwd #include #include #else +/** Below defination is setting by autoconf later... */ +#define __USE_POSIX 1 // needed for limits.h +#define __USE_XOPEN2K 1 +#define __STDC_FORMAT_MACROS 1 // needed for unix formatting output +#define _POSIX_C_SOURCE 1 + +#include +#include +#include #include +#include #endif + +#ifdef _WIN32 +#if defined(WIN32) && !defined(__MINGW32__) && !defined(__MINGW64__) +#define MAX_PATH _MAX_PATH +#else // MSVC +#define MAX_PATH FILENAME_MAX +#endif // MinGW32,64 +#elif __unix__ +#define MAX_PATH _POSIX_PATH_MAX +#else // Linux/BSD/MacOSX +#error "MAX_PATH is undefined" +#endif + #include #include #include #include -#include // needed for play_nice routines +#include // needed for play_nice routines #include #include #include #include -//#include "config.h" - -//#include "mpeg2convert.h" -#include "argtable2.h" +#include +#include +#include #include "comskip.h" -#define bool int -#define true 1 -#define false 0 - // Define detection methods #define BLACK_FRAME 1 #define LOGO 2 -#define SCENE_CHANGE 4 -#define RESOLUTION_CHANGE 8 -#define CC 16 -#define AR 32 +#define SCENE_CHANGE 4 +#define RESOLUTION_CHANGE 8 +#define CC 16 +#define AR 32 #define SILENCE 64 #define CUTSCENE 128 // Define logo detection directions -#define HORIZ 0 -#define VERT 1 -#define DIAG1 2 -#define DIAG2 3 +#define HORIZ 0 +#define VERT 1 +#define DIAG1 2 +#define DIAG2 3 // Define CC types -#define NONE 0 -#define ROLLUP 1 -#define POPON 2 -#define PAINTON 3 -#define COMMERCIAL 4 - -// Define aspect ratio +#define NONE 0 +#define ROLLUP 1 +#define POPON 2 +#define PAINTON 3 +#define COMMERCIAL 4 + +// Define aspect ratio #define FULLSCREEN true #define WIDESCREEN false - - -#define AR_TREND 0.8 -#define DEEP_SILENCE 6 //max_volume / DEEP_SILENCE defines deep silence - -#define OPEN_INPUT 1 -#define OPEN_INI 2 -#define SAVE_DMP 3 -#define SAVE_INI 4 + +#define AR_TREND 0.8 +#define DEEP_SILENCE 6 //max_volume / DEEP_SILENCE defines deep silence + +#define OPEN_INPUT 1 +#define OPEN_INI 2 +#define SAVE_DMP 3 +#define SAVE_INI 4 // max number of frames that can be marked -#define MAX_IDENTIFIERS 300000 -#define MAX_COMMERCIALS 100000 -int argument_count; -char ** argument = NULL; +#define MAX_IDENTIFIERS 300000 +#define MAX_COMMERCIALS 100000 + +int argument_count; +char ** argument = NULL; bool initialized = false; const char* progname = "ComSkip"; FILE* out_file = NULL; @@ -121,29 +140,31 @@ extern int selected_audio_pid; extern int selected_subtitle_pid; extern int selected_video_pid; extern int demux_asf; +extern int key; +extern char osname[]; -extern int key; -extern char osname[]; +#define KDOWN 1 +#define KUP 2 +#define KLEFT 3 +#define KRIGHT 4 +#define KNEXT 5 +#define KPREV 6 -#define KDOWN 1 -#define KUP 2 -#define KLEFT 3 -#define KRIGHT 4 -#define KNEXT 5 -#define KPREV 6 extern int xPos,yPos,lMouseDown; - extern int framenum_infer; +#ifdef _WIN32 extern struct _stati64 instat; -#define filesize stat.st_size - +#else +extern struct stat instat; +#endif -extern __int64 headerpos; -int vo_init_done = 0; -extern int soft_seeking; +#define filesize stat.st_size -static FILE* in_file = NULL; +extern __int64 headerpos; +int vo_init_done = 0; +extern int soft_seeking; +static FILE* in_file = NULL; #undef FRAME_WITH_HISTOGRAM #undef FRAME_WITH_LOGO @@ -151,7 +172,6 @@ static FILE* in_file = NULL; typedef struct { -// long frame; int brightness; int schange_percent; int minY; @@ -163,31 +183,29 @@ typedef struct bool logo_present; bool commercial; bool isblack; - __int64 goppos; + __int64 goppos; double pts; int minX; int maxX; int hasBright; int dimCount; - int cutscenematch; - double logo_filter; - int xds; + int cutscenematch; + double logo_filter; + int xds; #ifdef FRAME_WITH_HISTOGRAM int histogram[256]; #endif } frame_info; -frame_info* frame = NULL; -long frame_count = 0; -long max_frame_count; +frame_info* frame = NULL; +long frame_count = 0; +long max_frame_count; static int aaa; #define F2V(X) (frame != NULL ? ((X) <= 0 ? frame[1].pts : ((X) >= frame_count ? frame[frame_count - 1].pts : frame[X].pts )) : (X) / fps) #define assert(T) (aaa = ((T) ? 1 : *(int *)0)) -//#define F2T(X) (F2V(X) - F2V(1)) #define F2T(X) (F2V(X)) #define F2L(X,Y) (F2V(X) - F2V(Y)) - #define F2F(X) ((int) (F2T(X) * fps + 1.5 )) typedef struct @@ -209,24 +227,23 @@ typedef struct int cause; } black_frame_info; -long black_count = 0; -black_frame_info* black = NULL; -long max_black_count; +long black_count = 0; +black_frame_info* black = NULL; +long max_black_count; typedef struct block_info { long f_start; long f_end; - unsigned int b_head; - unsigned int b_tail; - unsigned int bframe_count; - unsigned int schange_count; - double schange_rate; // in changes per second + unsigned int b_head; + unsigned int b_tail; + unsigned int bframe_count; + unsigned int schange_count; + double schange_rate; // in changes per second double length; double score; int combined_count; int cc_type; -// bool ar; double ar_ratio; int cause; int more; @@ -243,22 +260,21 @@ typedef struct block_info int iscommercial; } block_info; -//block_info* cblock = NULL; +#define cblock cblock +#define MAX_BLOCKS 1000 -#define cblock cblock -#define MAX_BLOCKS 1000 struct block_info cblock[MAX_BLOCKS]; long block_count = 0; long max_block_count; -#define C_c (1<<1) -#define C_l (1<<0) -#define C_s (1<<2) -#define C_a (1<<5) -#define C_u (1<<3) -#define C_b (1<<4) -#define C_r ((long)1<<29) +#define C_c (1<<1) +#define C_l (1<<0) +#define C_s (1<<2) +#define C_a (1<<5) +#define C_u (1<<3) +#define C_b (1<<4) +#define C_r ((long)1<<29) #define C_STRICT (1<<6) #define C_NONSTRICT (1<<7) @@ -273,7 +289,7 @@ long max_block_count; #define C_H4 ((long)1<<16) #define C_H5 ((long)1<<17) #define C_H6 ((long)1<<22) -#define C_v ((long)1<<18) +#define C_v ((long)1<<18) #define C_BRIGHT ((long)1<<19) #define C_NOTBRIGHT ((long)1<<20) #define C_DIM ((long)1<<21) @@ -282,17 +298,12 @@ long max_block_count; #define C_AL ((long)1<<25) #define C_AS ((long)1<<26) #define C_AC ((long)1<<26) -#define C_F ((long)1<<27) -#define C_t ((long)1<<28) +#define C_F ((long)1<<27) +#define C_t ((long)1<<28) #define C_H7 ((long)1<<29) - -#define C_CUTMASK (C_c | C_l | C_s | C_a | C_u | C_b | C_t | C_r) -#define CUTCAUSE(c) ( c & C_CUTMASK) - - -//int minLogo = 30; -//int maxLogo = 120; +#define C_CUTMASK (C_c | C_l | C_s | C_a | C_u | C_b | C_t | C_r) +#define CUTCAUSE(c) ( c & C_CUTMASK) typedef struct { @@ -300,12 +311,12 @@ typedef struct int end; } logo_block_info; -logo_block_info* logo_block = NULL; -long logo_block_count = 0; // How many groups have already been identified. Increment after fill. -long max_logo_block_count; +logo_block_info* logo_block = NULL; +long logo_block_count = 0; // How many groups have already been identified. Increment after fill. +long max_logo_block_count; -bool processCC = false; -extern int reorderCC; +bool processCC = false; +extern int reorderCC; typedef struct { @@ -318,479 +329,442 @@ ccPacket cc; typedef struct { - long start_frame; - long end_frame; - int type; + long start_frame; + long end_frame; + int type; } cc_block_info; -cc_block_info* cc_block = NULL; -long cc_block_count = 0; -long max_cc_block_count; -int last_cc_type = NONE; -int current_cc_type = NONE; -bool cc_on_screen = false; -bool cc_in_memory = false; +cc_block_info* cc_block = NULL; +long cc_block_count = 0; +long max_cc_block_count; +int last_cc_type = NONE; +int current_cc_type = NONE; +bool cc_on_screen = false; +bool cc_in_memory = false; typedef struct { - long frame; - char name[40]; - int v_chip; - int duration; - int position; - int composite1; - int composite2; + long frame; + char name[40]; + int v_chip; + int duration; + int position; + int composite1; + int composite2; } XDS_block_info; -XDS_block_info* XDS_block = NULL; -long XDS_block_count = 0; -long max_XDS_block_count; +XDS_block_info* XDS_block = NULL; +long XDS_block_count = 0; +long max_XDS_block_count; typedef struct { - long start_frame; - long end_frame; - long text_len; + long start_frame; + long end_frame; + long text_len; unsigned char text[256]; } cc_text_info; -cc_text_info* cc_text = NULL; -long cc_text_count = 0; -long max_cc_text_count = 0; +cc_text_info* cc_text = NULL; +long cc_text_count = 0; +long max_cc_text_count = 0; #define AR_UNDEF 0.0 typedef struct { - int start; - int end; -// bool ar; - double ar_ratio; - int volume; - int height, width; - int minX,maxX,minY,maxY; + int start; + int end; + double ar_ratio; + int volume; + int height, width; + int minX,maxX,minY,maxY; } ar_block_info; -ar_block_info* ar_block = NULL; -long ar_block_count = 0; // How many groups have already been identified. Increment after fill. -long max_ar_block_count; -double last_ar_ratio = 0.0; -double ar_ratio_trend = 0.0; -int ar_ratio_trend_counter = 0; -int ar_ratio_start = 0; -int ar_misratio_trend_counter = 0; -int ar_misratio_start = 0; - +ar_block_info* ar_block = NULL; +long ar_block_count = 0; // How many groups have already been identified. Increment after fill. +long max_ar_block_count; +double last_ar_ratio = 0.0; +double ar_ratio_trend = 0.0; +int ar_ratio_trend_counter = 0; +int ar_ratio_start = 0; +int ar_misratio_trend_counter = 0; +int ar_misratio_start = 0; typedef struct { - long start; - long end; + long start; + long end; } commercial_list_info; commercial_list_info* commercial_list = NULL; - -int commercial_count = -1; +int commercial_count = -1; struct { - long start_frame; - long end_frame; - int start_block; - int end_block; - double length; + long start_frame; + long end_frame; + int start_block; + int end_block; + double length; } commercial[MAX_COMMERCIALS]; -int reffer_count = -1; +int reffer_count = -1; struct { - long start_frame; - long end_frame; + long start_frame; + long end_frame; } reffer[MAX_COMMERCIALS]; - - #define MAX_ASPECT_RATIOS 1000 struct { - long frames; - double ar_ratio; + long frames; + double ar_ratio; } ar_histogram[MAX_ASPECT_RATIOS]; -double dominant_ar; +double dominant_ar; int thread_count = 2; -int skip_B_frames = 0; -int lowres = 0; -bool live_tv = false; -bool output_incommercial = false; -int incommercial_frames = 1000; -int live_tv_retries = 6; -int dvrms_live_tv_retries = 300; -int standoff = 0; -int dvrmsstandoff = 120000; -extern int standoff_retries; -extern int standoff_time; -extern int standoff_size; -extern int standoff_initial_size; -extern int standoff_initial_wait; - -char incomingCommandLine[MAX_PATH]; -char logofilename[MAX_PATH]; -char logfilename[MAX_PATH]; -char mpegfilename[MAX_PATH]; -char exefilename[MAX_PATH]; -char basename[MAX_PATH]; -char workbasename[MAX_PATH]; -char outbasename[MAX_PATH]; -char shortbasename[MAX_PATH]; -char inifilename[MAX_PATH]; -char dictfilename[MAX_PATH]; -char out_filename[MAX_PATH]; -char incommercial_filename[MAX_PATH]; - -char outputdirname[MAX_PATH]; -char filename[MAX_PATH]; -int curvolume = -1; -extern int framenum; -//unsigned int frame_period; -//int audio_framenum = 0; -//extern __int64 pts; -extern __int64 initial_pts; -extern int initial_pts_set; - +int skip_B_frames = 0; +int lowres = 0; +bool live_tv = false; +bool output_incommercial = false; +int incommercial_frames = 1000; +int live_tv_retries = 6; +int dvrms_live_tv_retries = 300; +int standoff = 0; +int dvrmsstandoff = 120000; +extern int standoff_retries; +extern int standoff_time; +extern int standoff_size; +extern int standoff_initial_size; +extern int standoff_initial_wait; +char incomingCommandLine[MAX_PATH]; +char logofilename[MAX_PATH]; +char logfilename[MAX_PATH]; +char mpegfilename[MAX_PATH]; +char exefilename[MAX_PATH]; +char basename[MAX_PATH]; +char workbasename[MAX_PATH]; +char outbasename[MAX_PATH]; +char shortbasename[MAX_PATH]; +char inifilename[MAX_PATH]; +char dictfilename[MAX_PATH]; +char out_filename[MAX_PATH]; +char incommercial_filename[MAX_PATH]; +char outputdirname[MAX_PATH]; +char filename[MAX_PATH]; +int curvolume = -1; +extern int framenum; +extern __int64 initial_pts; +extern int initial_pts_set; int ascr,scr; -int framenum_real; -int frames_with_logo; -int framesprocessed = 0; -char HomeDir[256]; // comskip home directory -char tempString[256]; -double average_score; -int brightness = 0; -long sum_brightness=0; -long sum_count; -int uniformHistogram[256]; +int framenum_real; +int frames_with_logo; +int framesprocessed = 0; +char HomeDir[256]; // comskip home directory +char tempString[256]; +double average_score; +int brightness = 0; +long sum_brightness=0; +long sum_count; +int uniformHistogram[256]; #define UNIFORMSCALE 100 -int brightHistogram[256]; -int blackHistogram[256]; -int volumeHistogram[256]; -int silenceHistogram[256]; -int logoHistogram[256]; -int volumeScale = 10; -int last_brightness = 0; -int min_brightness_found; -int min_volume_found; -int max_logo_gap; -int max_nonlogo_block_length; -double logo_overshoot; -double logo_quality; -int width, old_width, videowidth; -int height, old_height; -int ar_width = 0; -int subsample_video = 0x1f; -//#define MAXWIDTH 800 -//#define MAXHEIGHT 600 +int brightHistogram[256]; +int blackHistogram[256]; +int volumeHistogram[256]; +int silenceHistogram[256]; +int logoHistogram[256]; +int volumeScale = 10; +int last_brightness = 0; +int min_brightness_found; +int min_volume_found; +int max_logo_gap; +int max_nonlogo_block_length; +double logo_overshoot; +double logo_quality; +int width, old_width, videowidth; +int height, old_height; +int ar_width = 0; +int subsample_video = 0x1f; #define MAXWIDTH 2000 #define MAXHEIGHT 1200 - -int haslogo[MAXWIDTH*MAXHEIGHT]; - -// unsigned char oldframe[MAXWIDTH*MAXHEIGHT]; - -// variables defining options with defaults -int selftest = 0; -int verbose = 0; // show extra info -double fps = 25.0; // frames per second (NTSC=29.970, PAL=25) -int border = 10; // border around edge of video to ignore -int ticker_tape=0, ticker_tape_percentage=0; // border from bottom to ignore -int ignore_side=0; -int max_brightness = 60; // frame not black if any pixels checked are greater than this (scale 0 to 255) -int maxbright = 1; -int min_hasBright = 255000; -int min_dimCount = 255000; -int test_brightness = 40; // frame not pure black if any pixels are greater than this, will check average -int max_avg_brightness = 19; // maximum average brightness for a dim frame to be considered black (scale 0 to -int max_volume = 500; -int max_silence = 100; -int min_silence = 12; -int punish_no_logo = true; -int validate_silence = true; -int validate_uniform = true; -int validate_scenechange = true; -int validate_ar = true; - -int punish = 0; -int reward = 0; -int min_volume=0; -int min_uniform = 0; -int volume_slip = 40; -extern int ms_audio_delay; -int max_repair_size = 40; -int variable_bitrate = 1; - +int haslogo[MAXWIDTH*MAXHEIGHT]; +int selftest = 0; +int verbose = 0; // show extra info +double fps = 25.0; // frames per second (NTSC=29.970, PAL=25) +int border = 10; // border around edge of video to ignore +int ticker_tape=0, ticker_tape_percentage=0;// border from bottom to ignore +int ignore_side=0; +int max_brightness = 60; // frame not black if any pixels checked are greater than this (scale 0 to 255) +int maxbright = 1; +int min_hasBright = 255000; +int min_dimCount = 255000; +int test_brightness = 40; // frame not pure black if any pixels are greater than this, will check average +int max_avg_brightness = 19; // maximum average brightness for a dim frame to be considered black (scale 0 to +int max_volume = 500; +int max_silence = 100; +int min_silence = 12; +int punish_no_logo = true; +int validate_silence = true; +int validate_uniform = true; +int validate_scenechange = true; +int validate_ar = true; + +int punish = 0; +int reward = 0; +int min_volume=0; +int min_uniform = 0; +int volume_slip = 40; +extern int ms_audio_delay; +int max_repair_size = 40; +int variable_bitrate = 1; extern int is_h264; ///brightness (scale 0 to 255) -char ini_text[40000]; +char ini_text[40000]; ///255) -double max_commercialbreak = 600; // maximum length in seconds to consider a segment a commercial break -double min_commercialbreak = 20; // minimum length in seconds to consider a segment a commercial break -double max_commercial_size = 120; // maximum time in seconds for a single commercial -double min_commercial_size = 4; // mimimum time in seconds for a single commercial -double min_show_segment_length = 120.0; -bool require_div5 = 0; // set=1 to only mark breaks divisible by 5 as a commercial. -double div5_tolerance = -1; -bool play_nice = false; -double global_threshold = 1.05; -bool intelligent_brightness = false; -double logo_threshold = 0.80; -double logo_max_percentage_of_screen = 0.12; -int logo_filter = 0; -int non_uniformity = 500; -int brightness_jump = 200; -double black_percentile = 0.0076; -double uniform_percentile = 0.003; -double score_percentile = 0.71; -double logo_percentile = 0.92; -double logo_fraction = 0.40; -int commDetectMethod = BLACK_FRAME + LOGO + RESOLUTION_CHANGE + AR + SILENCE; // + CC -int giveUpOnLogoSearch = 2000; // If no logo is identified after x seconds into the show - give up. -int delay_logo_search = 0; // If no logo is identified after x seconds into the show - give up. -bool cut_on_ar_change = 1; -int added_recording = 14; -int after_start = 0; -int before_end = 0; -int delete_show_after_last_commercial = false; -int delete_show_before_first_commercial = false; -int delete_block_after_commercial = 0; -int min_commercial_break_at_start_or_end = 39; -int always_keep_first_seconds = 0; -int always_keep_last_seconds = 0; - -bool connect_blocks_with_logo = true; -int delete_show_before_or_after_current = false; -bool deleteLogoFile = true; -bool useExistingLogoFile = true; -bool startOverAfterLogoInfoAvail = true; -int doublCheckLogoCount = 0; -bool output_default = true; -bool output_chapters = false; -bool sage_framenumber_bug = false; -bool sage_minute_bug = false; -bool enable_mencoder_pts = false; -bool output_plist_cutlist = false; -bool output_zoomplayer_cutlist = false; -bool output_zoomplayer_chapter = false; -bool output_videoredo = false; -bool output_videoredo3 = false; -bool output_ipodchap = false; -int videoredo_offset = 2; -int edl_offset = 0; -int edl_skip_field = 0; -bool output_edl = false; -bool output_edlp = false; -bool output_bsplayer = false; -bool output_edlx = false; -bool output_btv = false; -bool output_cuttermaran = false; -bool output_mpeg2schnitt = false; -char cuttermaran_options[1024]; -char mpeg2schnitt_options[1024]; -char avisynth_options[1024]; -char dvrcut_options[1024]; -bool output_demux = false; -bool output_data = false; -bool output_srt = false; -bool output_smi = false; -bool output_timing = false; -bool output_womble = false; -bool output_mls = false; -bool output_mpgtx = false; -bool output_dvrcut = false; -bool output_dvrmstb = false; -bool output_vdr = false; -bool output_vcf = false; -bool output_projectx = false; -bool output_avisynth = false; -bool output_debugwindow = false; -bool output_console = true; -int disable_heuristics = 0; -char windowtitle[1024] = "Comskip - %s"; -bool output_tuning = false; -bool output_training = false; -bool output_false = false; -bool output_aspect = false; -int noise_level=5; -bool framearray = true; -bool output_framearray = false; -bool only_strict = false; -double length_strict_modifier = 3.0; -double length_nonstrict_modifier = 1.5; -double combined_length_strict_modifier = 2.0; -double combined_length_nonstrict_modifier = 1.25; -double logo_present_modifier = 0.01; -double punish_modifier = 2.0; -double punish_threshold = 1.3; -double reward_modifier = 0.5; -int after_logo=0; -int before_logo=0; -double shrink_logo=5.0; -int shrink_logo_tail=0; -int where_logo=0; -double excessive_length_modifier = 0.01; -double dark_block_modifier = 0.3; -int padding = 0; -int remove_before = 0; -int remove_after = 0; -double min_schange_modifier = 0.5; -double max_schange_modifier = 2.0; -int schange_threshold = 90; -int schange_cutlevel = 15; -double cc_commercial_type_modifier = 4.0; -double cc_wrong_type_modifier = 2.0; -double cc_correct_type_modifier = 0.75; -double ar_wrong_modifier = 2.0; -double ar_rounding = 100; -double ar_delta = 0.08; -long avg_brightness = 0; -long maxi_volume = 0; -long avg_volume = 0; -long avg_silence = 0; -long avg_uniform = 0; -double avg_schange = 0.0; -double dictionary_modifier = 1.05; -bool aggressive_logo_rejection = false; +double max_commercialbreak = 600; // maximum length in seconds to consider a segment a commercial break +double min_commercialbreak = 20; // minimum length in seconds to consider a segment a commercial break +double max_commercial_size = 120; // maximum time in seconds for a single commercial +double min_commercial_size = 4; // mimimum time in seconds for a single commercial +double min_show_segment_length = 120.0; +bool require_div5 = 0; // set=1 to only mark breaks divisible by 5 as a commercial +double div5_tolerance = -1; +bool play_nice = false; +double global_threshold = 1.05; +bool intelligent_brightness = false; +double logo_threshold = 0.80; +double logo_max_percentage_of_screen = 0.12; +int logo_filter = 0; +int non_uniformity = 500; +int brightness_jump = 200; +double black_percentile = 0.0076; +double uniform_percentile = 0.003; +double score_percentile = 0.71; +double logo_percentile = 0.92; +double logo_fraction = 0.40; +int commDetectMethod = BLACK_FRAME + LOGO + RESOLUTION_CHANGE + AR + SILENCE; // + CC +int giveUpOnLogoSearch = 2000; // If no logo is identified after x seconds into the show - give up. +int delay_logo_search = 0; // If no logo is identified after x seconds into the show - give up. +bool cut_on_ar_change = 1; +int added_recording = 14; +int after_start = 0; +int before_end = 0; +int delete_show_after_last_commercial = false; +int delete_show_before_first_commercial = false; +int delete_block_after_commercial = 0; +int min_commercial_break_at_start_or_end = 39; +int always_keep_first_seconds = 0; +int always_keep_last_seconds = 0; +bool connect_blocks_with_logo = true; +int delete_show_before_or_after_current = false; +bool deleteLogoFile = true; +bool useExistingLogoFile = true; +bool startOverAfterLogoInfoAvail = true; +int doublCheckLogoCount = 0; +bool output_default = true; +bool output_chapters = false; +bool sage_framenumber_bug = false; +bool sage_minute_bug = false; +bool enable_mencoder_pts = false; +bool output_plist_cutlist = false; +bool output_zoomplayer_cutlist = false; +bool output_zoomplayer_chapter = false; +bool output_videoredo = false; +bool output_videoredo3 = false; +bool output_ipodchap = false; +int videoredo_offset = 2; +int edl_offset = 0; +int edl_skip_field = 0; +bool output_edl = false; +bool output_edlp = false; +bool output_bsplayer = false; +bool output_edlx = false; +bool output_btv = false; +bool output_cuttermaran = false; +bool output_mpeg2schnitt = false; +char cuttermaran_options[1024]; +char mpeg2schnitt_options[1024]; +char avisynth_options[1024]; +char dvrcut_options[1024]; +bool output_demux = false; +bool output_data = false; +bool output_srt = false; +bool output_smi = false; +bool output_timing = false; +bool output_womble = false; +bool output_mls = false; +bool output_mpgtx = false; +bool output_dvrcut = false; +bool output_dvrmstb = false; +bool output_vdr = false; +bool output_vcf = false; +bool output_projectx = false; +bool output_avisynth = false; +bool output_debugwindow = false; +bool output_console = true; +int disable_heuristics = 0; +char windowtitle[1024] = "Comskip - %s"; +bool output_tuning = false; +bool output_training = false; +bool output_false = false; +bool output_aspect = false; +int noise_level=5; +bool framearray = true; +bool output_framearray = false; +bool only_strict = false; +double length_strict_modifier = 3.0; +double length_nonstrict_modifier = 1.5; +double combined_length_strict_modifier = 2.0; +double combined_length_nonstrict_modifier = 1.25; +double logo_present_modifier = 0.01; +double punish_modifier = 2.0; +double punish_threshold = 1.3; +double reward_modifier = 0.5; +int after_logo=0; +int before_logo=0; +double shrink_logo=5.0; +int shrink_logo_tail=0; +int where_logo=0; +double excessive_length_modifier = 0.01; +double dark_block_modifier = 0.3; +int padding = 0; +int remove_before = 0; +int remove_after = 0; +double min_schange_modifier = 0.5; +double max_schange_modifier = 2.0; +int schange_threshold = 90; +int schange_cutlevel = 15; +double cc_commercial_type_modifier = 4.0; +double cc_wrong_type_modifier = 2.0; +double cc_correct_type_modifier = 0.75; +double ar_wrong_modifier = 2.0; +double ar_rounding = 100; +double ar_delta = 0.08; +long avg_brightness = 0; +long maxi_volume = 0; +long avg_volume = 0; +long avg_silence = 0; +long avg_uniform = 0; +double avg_schange = 0.0; +double dictionary_modifier = 1.05; +bool aggressive_logo_rejection = false; unsigned int min_black_frames_for_break = 1; -bool detectBlackFrames; -bool detectSceneChanges; -int dummy1; +bool detectBlackFrames; +bool detectSceneChanges; +int dummy1; unsigned char* frame_ptr; -int dummy2; +int dummy2; +bool sceneHasChanged; +int sceneChangePercent; +bool lastFrameWasBlack = false; +bool lastFrameWasSceneChange = false; +int histogram[256]; +int lastHistogram[256]; -// bool frameIsBlack; -bool sceneHasChanged; -int sceneChangePercent; -bool lastFrameWasBlack = false; -bool lastFrameWasSceneChange = false; -int histogram[256]; -int lastHistogram[256]; - -#define MAXCSLENGTH 400*300 -#define MAXCUTSCENES 8 +#define MAXCSLENGTH 400*300 +#define MAXCUTSCENES 8 void LoadCutScene(const char *filename); void RecordCutScene(int frame_count,int brightness); -char cutscenefile[1024]; -char cutscenefile1[1024]; -char cutscenefile2[1024]; -char cutscenefile3[1024]; -char cutscenefile4[1024]; -char cutscenefile5[1024]; -char cutscenefile6[1024]; -char cutscenefile7[1024]; -char cutscenefile8[1024]; - -int cutscenematch; -int cutscenedelta = 10; -int cutsceneno = 0; +char cutscenefile[1024]; +char cutscenefile1[1024]; +char cutscenefile2[1024]; +char cutscenefile3[1024]; +char cutscenefile4[1024]; +char cutscenefile5[1024]; +char cutscenefile6[1024]; +char cutscenefile7[1024]; +char cutscenefile8[1024]; +int cutscenematch; +int cutscenedelta = 10; +int cutsceneno = 0; static int myremove( char * f); -int cutscenes=0; +int cutscenes=0; unsigned char cutscene[MAXCUTSCENES][MAXCSLENGTH]; -int csbrightness[MAXCUTSCENES]; -int cslength[MAXCUTSCENES]; - -// int cssum[MAXCUTSCENES]; -// int csmatch[MAXCUTSCENES]; - - -char debugText[20000]; -bool logoInfoAvailable; -bool secondLogoSearch = false; -bool logoBuffersFull = false; -int logoTrendCounter = 0; -double logoFreq = 1.0; // times fps between logo checks -int num_logo_buffers = 50; // How many frames to compare at a time for logo detection; -bool lastLogoTest = false; -// int logoTrendStartFrame; -int* logoFrameNum = NULL; // Keep track of the frame numbers of each buffer -int oldestLogoBuffer; // Which buffer is the oldest? -// int lastRealLogoChange; -bool curLogoTest = false; -int minHitsForTrend = 10; -// bool hindsightLogoState = true; -double logoPercentage = 0.0; -bool reverseLogoLogic = false; +int csbrightness[MAXCUTSCENES]; +int cslength[MAXCUTSCENES]; +char debugText[20000]; +bool logoInfoAvailable; +bool secondLogoSearch = false; +bool logoBuffersFull = false; +int logoTrendCounter = 0; +double logoFreq = 1.0; // times fps between logo checks +int num_logo_buffers = 50; // How many frames to compare at a time for logo detection; +bool lastLogoTest = false; +int* logoFrameNum = NULL; // Keep track of the frame numbers of each buffer +int oldestLogoBuffer; // Which buffer is the oldest? +bool curLogoTest = false; +int minHitsForTrend = 10; +double logoPercentage = 0.0; +bool reverseLogoLogic = false; #define MULTI_EDGE_BUFFER 0 #if MULTI_EDGE_BUFFER -unsigned char ** horiz_edges = NULL; // rotating storage for detected horizontal edges -unsigned char ** vert_edges = NULL; // rotating storage for detected vertical edges +unsigned char ** horiz_edges = NULL; // rotating storage for detected horizontal edges +unsigned char ** vert_edges = NULL; // rotating storage for detected vertical edges #else -unsigned char horiz_count[MAXHEIGHT*MAXWIDTH]; -unsigned char vert_count[MAXHEIGHT*MAXWIDTH]; +unsigned char horiz_count[MAXHEIGHT*MAXWIDTH]; +unsigned char vert_count[MAXHEIGHT*MAXWIDTH]; #endif -double borderIgnore = .05; // Percentage of each side to ignore for logo detection -int subtitles = 0; -int logo_at_bottom = 0; -int edge_radius = 2; -int int_edge_radius = 2; -int edge_step = 1; -int edge_level_threshold = 5; -int edge_weight = 10; -int edge_count = 0; -int hedge_count = 0; -int vedge_count = 0; -int newestLogoBuffer = -1; // Which buffer is the newest? Increments prior to fill so start at -1 -unsigned char ** logoFrameBuffer = NULL; // rotating storage for frames -int logoFrameBufferSize = 0; -int lwidth; -int lheight; - -int tlogoMinX; -int tlogoMaxX; -int tlogoMinY; -int tlogoMaxY; -unsigned char thoriz_edgemask[MAXHEIGHT*MAXWIDTH]; -unsigned char tvert_edgemask[MAXHEIGHT*MAXWIDTH]; - -int clogoMinX; -int clogoMaxX; -int clogoMinY; -int clogoMaxY; -unsigned char choriz_edgemask[MAXHEIGHT*MAXWIDTH]; -unsigned char cvert_edgemask[MAXHEIGHT*MAXWIDTH]; - - -int play_nice_start = -1; -int play_nice_end = -1; -long play_nice_sleep = 10L; -FILE *dump_data_file = (FILE *)NULL; -uint8_t ccData[500]; -int ccDataLen; -static uint8_t prevccData[500]; -static int prevccDataLen; -long cc_count[5] = { 0, 0, 0, 0, 0 }; -int most_cc_type = NONE; +double borderIgnore = .05; // Percentage of each side to ignore for logo detection +int subtitles = 0; +int logo_at_bottom = 0; +int edge_radius = 2; +int int_edge_radius = 2; +int edge_step = 1; +int edge_level_threshold = 5; +int edge_weight = 10; +int edge_count = 0; +int hedge_count = 0; +int vedge_count = 0; +int newestLogoBuffer = -1; // Which buffer is the newest? Increments prior to fill so start at -1 +unsigned char ** logoFrameBuffer = NULL; // rotating storage for frames +int logoFrameBufferSize = 0; +int lwidth; +int lheight; +int tlogoMinX; +int tlogoMaxX; +int tlogoMinY; +int tlogoMaxY; +unsigned char thoriz_edgemask[MAXHEIGHT*MAXWIDTH]; +unsigned char tvert_edgemask[MAXHEIGHT*MAXWIDTH]; +int clogoMinX; +int clogoMaxX; +int clogoMinY; +int clogoMaxY; +unsigned char choriz_edgemask[MAXHEIGHT*MAXWIDTH]; +unsigned char cvert_edgemask[MAXHEIGHT*MAXWIDTH]; +int play_nice_start = -1; +int play_nice_end = -1; +long play_nice_sleep = 10L; +FILE* dump_data_file = (FILE *)NULL; +uint8_t ccData[500]; +int ccDataLen; +static uint8_t prevccData[500]; +static int prevccDataLen; +long cc_count[5] = { 0, 0, 0, 0, 0 }; +int most_cc_type = NONE; unsigned char ** cc_screen = NULL; unsigned char ** cc_memory = NULL; -int minY; // The top of the picture for aspect ratio calculation -int maxY; // The bottom of the picture for aspect ratio calculation -int minX; // The top of the picture for aspect ratio calculation -int maxX; // The bottom of the picture for aspect ratio calculation -//bool currentAR; -//bool lastAR; -//bool showAvgAR; -bool isSecondPass = false; -long lastFrame = 0; -long lastFrameCommCalculated = 0; -bool ccCheck = false; -bool loadingCSV = false; -bool loadingTXT = false; -int helpflag = 0; -int timeflag = 0; -int recalculate=0; +int minY; // The top of the picture for aspect ratio calculation +int maxY; // The bottom of the picture for aspect ratio calculation +int minX; // The top of the picture for aspect ratio calculation +int maxX; // The bottom of the picture for aspect ratio calculation +bool isSecondPass = false; +long lastFrame = 0; +long lastFrameCommCalculated = 0; +bool ccCheck = false; +bool loadingCSV = false; +bool loadingTXT = false; +int helpflag = 0; +int timeflag = 0; +int recalculate=0; + char *helptext[]= { @@ -839,19 +813,18 @@ unsigned char graph[MAXHEIGHT*MAXWIDTH*3]; int gy=0; // Function Prototypes -FILE *myfopen( const char * f, char * m); bool BuildBlocks(bool recalc); void Recalc(void); double ValidateBlackFrames(long reason, double ratio, int remove); -int DetectCommercials(int, double); +int DetectCommercials(int, double); bool BuildMasterCommList(void); void WeighBlocks(void); bool OutputBlocks(void); -void OutputAspect(void); -void OutputTraining(void); -bool ProcessLogoTest(int framenum_real, int curLogoTest, int close); -void OutputStrict(double len, double delta, double tol); -int InputReffer(char *ext, int setfps); +void OutputAspect(void); +void OutputTraining(void); +bool ProcessLogoTest(int framenum_real, int curLogoTest, int close); +void OutputStrict(double len, double delta, double tol); +int InputReffer(char *ext, int setfps); bool IsStandardCommercialLength(double length, double tolerance, bool strict); bool LengthWithinTolerance(double test_length, double expected_length, double tolerance); double FindNumber(char* str1, char* str2, double v); @@ -860,7 +833,7 @@ void AddIniString( char *s); char* intSecondsToStrMinutes(int seconds); char* dblSecondsToStrMinutes(double seconds); FILE* LoadSettings(int argc, char ** argv); -int GetAvgBrightness(void); +int GetAvgBrightness(void); bool CheckFrameIsBlack(void); void BuildBlackFrameCommList(void); bool CheckSceneHasChanged(void); @@ -878,8 +851,8 @@ bool SearchForLogoEdges(void); double CheckStationLogoEdge(unsigned char* testFrame); double DoubleCheckStationLogoEdge(unsigned char* testFrame); void SetEdgeMaskArea(unsigned char* temp); -int ClearEdgeMaskArea(unsigned char* temp, unsigned char* test); -int CountEdgePixels(void); +int ClearEdgeMaskArea(unsigned char* temp, unsigned char* test); +int CountEdgePixels(void); void DumpEdgeMask(unsigned char* buffer, int direction); void DumpEdgeMasks(void); void BuildBlackFrameAndLogoCommList(void); @@ -890,7 +863,7 @@ void SaveLogoMaskData(void); void LoadLogoMaskData(void); double CalculateLogoFraction(int start, int end); bool CheckFrameForLogo(int i); -int CountSceneChanges(int StartFrame, int EndFrame); +int CountSceneChanges(int StartFrame, int EndFrame); void Debug(int level, char* fmt, ...); void InitProcessLogoTest(void); void InitComSkip(void); @@ -901,8 +874,8 @@ void OutputLogoHistogram(int buckets); void OutputbrightHistogram(void); void OutputuniformHistogram(void); void OutputHistogram(int *histogram, int scale, char *title, bool truncate); -int FindBlackThreshold(double percentile); -int FindUniformThreshold(double percentile); +int FindBlackThreshold(double percentile); +int FindUniformThreshold(double percentile); void OutputFrameArray(bool screenOnly); void OutputFrame(); void OpenOutputFiles(); @@ -915,7 +888,7 @@ void InitializeBlockArray(long i); void InitializeCCBlockArray(long i); void InitializeCCTextArray(long i); void PrintArgs(void); -void close_dump(void); +void close_dump(void); void OutputCommercialBlock(int i, long prev, long start, long end, bool last); void ProcessCSV(FILE *); void OutputCCBlock(long i); @@ -923,20 +896,29 @@ void ProcessCCData(void); bool CheckOddParity(unsigned char ch); void AddNewCCBlock(long current_frame, int type, bool cc_on_screen, bool cc_in_memory); char* CCTypeToStr(int type); -int DetermineCCTypeForBlock(long start, long end); +int DetermineCCTypeForBlock(long start, long end); double AverageARForBlock(int start, int end); void SetARofBlocks(void); bool ProcessCCDict(void); -int FindBlock(long frame); +int FindBlock(long frame); void BuildCommListAsYouGo(void); void BuildCommercial(void); -int RetreiveVolume (int f); -void InsertBlackFrame(int f, int b, int u, int v, int c); -extern void DecodeOnePicture(FILE * f, double pts, double length); - +int RetreiveVolume (int f); +void InsertBlackFrame(int f, int b, int u, int v, int c); +extern void DecodeOnePicture(FILE * f, double pts, double length); +int CEW_init(int argc, char *argv[]); +void Init_XDS_block(); +FILE* myfopen(const char * f, char * m); +#ifdef _WIN32 +static int mystat(char * f, struct _stati64 * s); +#else +static int mystat(char * f, struct stat * s); +#endif -int CEW_init(int argc, char *argv[]); +int myremove(char * f); +int max(int i,int j); +int min(int i,int j); char *CauseString(int i) { @@ -1097,20 +1079,6 @@ double ValidateBlackFrames(long reason, double ratio, int remove) } } } - - /* - - if (negative_count > 1 && reason == C_v) - { - Debug(1, "Too mutch Silence Frames, disabling silence detection\n"); - commDetectMethod &= ~SILENCE; - } - if (negative_count > 1 && reason == C_s) - { - Debug(1, "Too mutch Scene Change, disabling Scene Change detection\n"); - commDetectMethod &= ~SCENE_CHANGE; - } - */ } @@ -1143,7 +1111,6 @@ double ValidateBlackFrames(long reason, double ratio, int remove) count++; if (IsStandardCommercialLength(length, F2T(i) - F2T(j) + 0.8 , false)) { -// if (length > max_commercial_size) { strict_count++; } } @@ -1181,7 +1148,6 @@ double ValidateBlackFrames(long reason, double ratio, int remove) } //Function code blocks - bool BuildBlocks(bool recalc) { int i = 0; @@ -1200,21 +1166,11 @@ bool BuildBlocks(bool recalc) int prev_head = 0; long b_start, b_end, b_counted; -// char *t = ""; - -// max_block_count = 80; max_block_count = MAX_BLOCKS; block_count = 0; -// cblock = malloc(max_block_count * sizeof(block_info)); - recalculate = recalc; InitializeBlockArray(0); - // If there are no black frames, nothing can be done -// if (!black_count && !ar_block_count) return (false); - -// OutputHistogram(volumeHistogram, volumeScale, "Volume", true); - if (!recalc) { // Eliminate frames that are too bright from black frame list @@ -1224,9 +1180,7 @@ bool BuildBlocks(bool recalc) max_avg_brightness = black_threshold = FindBlackThreshold(black_percentile); Debug(1, "Setting brightness threshold to %i\n", black_threshold); } - if ((intelligent_brightness && non_uniformity > 0) -// || (commDetectMethod & BLACK_FRAME && non_uniformity == 0) // Diabled - ) + if ((intelligent_brightness && non_uniformity > 0)) { OutputuniformHistogram (); non_uniformity = uniform_threshold = FindUniformThreshold(uniform_percentile); @@ -1237,7 +1191,7 @@ bool BuildBlocks(bool recalc) for (i = 1; i < frame_count; i++) { frame[i].isblack &= ~C_u; - if (/*!(frame[i].isblack & C_b) && */ non_uniformity > 0 && frame[i].uniform < non_uniformity && frame[i].brightness < 180/*&& frame[i].volume < max_volume*/ ) + if ( non_uniformity > 0 && frame[i].uniform < non_uniformity && frame[i].brightness < 180 ) InsertBlackFrame(i,frame[i].brightness,frame[i].uniform,frame[i].volume, (int)C_u); } } @@ -1339,24 +1293,20 @@ bool BuildBlocks(bool recalc) if ((black[k].cause & C_t) != 0) continue; if (black[k].volume > max_volume -// && -// ( black[k].frame > 10 && (int)frame[black[k].frame-2].brightness < (int)frame[black[k].frame].brightness + 50 && -// black[k].frame < frame_count - 10 && (int)frame[black[k].frame+2].brightness < (int) frame[black[k].frame].brightness + 50 ) -// || black[k].volume > max_volume * 1.5 - ) + ) { Debug - ( - 12, - "%i - Removing black frame %i, from black frame list because volume %i is more than %i, brightness %i, uniform %i\n", - k, - black[k].frame, - black[k].volume, - max_volume, - black[k].brightness, - black[k].uniform - ); + ( + 12, + "%i - Removing black frame %i, from black frame list because volume %i is more than %i, brightness %i, uniform %i\n", + k, + black[k].frame, + black[k].volume, + max_volume, + black[k].brightness, + black[k].uniform + ); for (j = k; j < black_count - 1; j++) { @@ -1379,16 +1329,16 @@ bool BuildBlocks(bool recalc) if ((black[k].cause & C_b) && black[k].brightness > max_avg_brightness) { - Debug - ( - 12, - "%i - Removing black frame %i, from black frame list because %i is more than %i, uniform %i\n", - k, - black[k].frame, - black[k].brightness, - max_avg_brightness, - black[k].uniform - ); + Debug + ( + 12, + "%i - Removing black frame %i, from black frame list because %i is more than %i, uniform %i\n", + k, + black[k].frame, + black[k].brightness, + max_avg_brightness, + black[k].uniform + ); for (j = k; j < black_count - 1; j++) { @@ -1407,15 +1357,15 @@ bool BuildBlocks(bool recalc) if ((black[k].cause & C_u) && black[k].uniform > non_uniformity) { Debug - ( - 12, - "%i - Removing uniform frame %i, from black frame list because %i is more than %i, brightness %i\n", - k, - black[k].frame, - black[k].uniform, - non_uniformity, - black[k].brightness - ); + ( + 12, + "%i - Removing uniform frame %i, from black frame list because %i is more than %i, brightness %i\n", + k, + black[k].frame, + black[k].uniform, + non_uniformity, + black[k].brightness + ); for (j = k; j < black_count - 1; j++) { @@ -1431,26 +1381,20 @@ bool BuildBlocks(bool recalc) { if (logoPercentage > logo_fraction && logoPercentage < logo_percentile) cut_on_ar_change = 1; -// else -// ar_wrong_modifier=1; } if (cut_on_ar_change==1) { -// if (logoPercentage < logo_fraction || logoPercentage > logo_percentile) -// cut_on_ar_change = 2; } if (((commDetectMethod & LOGO) && cut_on_ar_change ) || cut_on_ar_change >= 2) { -// if (cut_on_ar_change ) { for (i = 0; i < ar_block_count; i++) { if ((cut_on_ar_change == 1 || ar_block[i].volume < max_volume) && - ar_block[i].ar_ratio != AR_UNDEF && ar_block[i+1].ar_ratio != AR_UNDEF) + ar_block[i].ar_ratio != AR_UNDEF && ar_block[i+1].ar_ratio != AR_UNDEF) { a = ar_block[i].end; -// if (a > 20 * fps) InsertBlackFrame(a,frame[a].brightness,frame[a].uniform,frame[a].volume, C_a); } } @@ -1459,15 +1403,12 @@ bool BuildBlocks(bool recalc) if (ValidateBlackFrames(C_b, 3.0, false) < 1 / 3.0) Debug(8, "Black Frame cutting too low\n"); - if (validate_scenechange /* || (logoPercentage < logo_fraction || logoPercentage > logo_percentile) */) + if (validate_scenechange) ValidateBlackFrames(C_s, ((logoPercentage < logo_fraction || logoPercentage > logo_percentile) ? 1.2 : 3.5), true); - // ValidateBlackFrames(C_c, 3.0, true); - if (validate_uniform) ValidateBlackFrames(C_u, 3.0, true); - if (commDetectMethod & SILENCE) { k = 0; @@ -1475,23 +1416,10 @@ bool BuildBlocks(bool recalc) { if (frame[i].volume < max_volume) k++; } - /* - if (k * 100 / frame_count > 25) { - Debug(8, "Too mutch Silence Frames (%d%%), disabling silence detection\n", k * 100 / frame_count); - - ValidateBlackFrames(C_v, 1.0, true); - commDetectMethod &= ~SILENCE; - validate_silence = 0; - } else - */ if (validate_silence) + if (validate_silence) ValidateBlackFrames(C_v, 3.0, true); } -// if (logoPercentage < logo_fraction) -// if (cut_on_ar_change == 2) -// ValidateBlackFrames(C_a, 3.0, true); - - Debug(8, "Black Frame List\n---------------------------\nBlack Frame Count = %i\nnr \tframe\tbright\tuniform\tvolume\t\tcause\tdimcount bright\n", black_count); for (k = 0; k < black_count; k++) { @@ -1506,24 +1434,12 @@ bool BuildBlocks(bool recalc) // add black frame at end to enable usage of last cblock InsertBlackFrame(framesprocessed,0,0,0,C_b); - /* - InitializeBlackArray(black_count); - black[black_count].frame = framesprocessed; - black[black_count].brightness = 0; - black[black_count].uniform = 0; - black[black_count].volume = 0; - black[black_count].cause = 0; - black_count++; - */ //Create blocks i = 0; j = 0; -// if (((commDetectMethod & LOGO) && cut_on_ar_change ) || cut_on_ar_change == 2) -// a = 0; -// else a = ar_block_count; // Don't cut on AR when logo disabled cause = 0; block_count = 0; @@ -1535,8 +1451,6 @@ bool BuildBlocks(bool recalc) { if (!(commDetectMethod & LOGO) && i < black_count && (black[i].cause & (C_s | C_l))) { -// i++; // Skip logo cuts and brighness cuts when not enough logo detected -// goto again; i = i; } cause = 0; @@ -1553,17 +1467,17 @@ bool BuildBlocks(bool recalc) while(j < black_count && (F2T(black[j].frame) - F2T(b_end) < 1.0 )) //Allow for 2 missing black frames { if (black[j].frame - b_end > 2 && - (((black[j].cause & (C_v)) != 0 && (cause & (C_v)) == 0) || - ((black[j].cause & (C_v)) == 0 && (cause & (C_v)) != 0))) + (((black[j].cause & (C_v)) != 0 && (cause & (C_v)) == 0) || + ((black[j].cause & (C_v)) == 0 && (cause & (C_v)) != 0))) { Debug - ( - 6, - "At frame %i there is a gap of %i frames in the blackframe list\n", - black[j].frame, - black[j].frame - b_end - ); + ( + 6, + "At frame %i there is a gap of %i frames in the blackframe list\n", + black[j].frame, + black[j].frame - b_end + ); } if ((black[j].cause & (C_b | C_s | C_u | C_r)) != 0) @@ -1623,16 +1537,16 @@ bool BuildBlocks(bool recalc) //If first cblock is < 1 sec. throw it away if( block_count > 0 || - F2L( cblock[block_count].f_end, cblock[block_count].f_start) > 1.0 || - cblock[block_count].f_end == framesprocessed - ) + F2L( cblock[block_count].f_end, cblock[block_count].f_start) > 1.0 || + cblock[block_count].f_end == framesprocessed + ) { - Debug(12, "Creating cblock %i From %i (%i) to %i (%i) because of %s with %i head and %i tail\n", - block_count, cblock[block_count].f_start, (cblock[block_count].f_start + cblock[block_count].b_head), - cblock[block_count].f_end, (cblock[block_count].f_end - cblock[block_count].b_tail), - CauseString(cause), - cblock[block_count].b_head, cblock[block_count].b_tail); + Debug(12, "Creating cblock %i From %i (%i) to %i (%i) because of %s with %i head and %i tail\n", + block_count, cblock[block_count].f_start, (cblock[block_count].f_start + cblock[block_count].b_head), + cblock[block_count].f_end, (cblock[block_count].f_end - cblock[block_count].b_tail), + CauseString(cause), + cblock[block_count].b_head, cblock[block_count].b_tail); block_count++; InitializeBlockArray(block_count); @@ -1707,39 +1621,6 @@ void FindLogoThreshold() } logo_quality = ((double) i + 0.5) / (double) buckets; Debug(8, "Set Logo Quality = %.5f\n", logo_quality); - - /* - j = 0; - for (i = 0; i < buckets/2; i++) { - j += logoHistogram[i]; - } - k = 0; - for (i = buckets/2; i < buckets; i++) { - k += logoHistogram[i]; - } - if (k < j * 1.3) { - logo_quality = 0.9; - } else { - k = logoHistogram[0]; - for (i = 0; i < buckets; i++) { - if (logoHistogram[k] < logoHistogram[i]) { - k = i; - } - } - if (k < buckets * 2 / 3) { - logo_quality = 0.9; - } else { - i = 0; - j = logoHistogram[0]; - for (i = buckets/2; i < k; i++) { - if (j * 10 / 8 >= logoHistogram[i]) { - j = logoHistogram[i]; - logo_quality = ((double) i + 0.5) / (double) buckets; - } - } - } - } - */ } if (logo_threshold == 0) { @@ -1750,18 +1631,18 @@ void FindLogoThreshold() void CleanLogoBlocks() { int i,k,n; -// double stdev; + // double stdev; int sum_brightness,v,b, sum_volume,s,sum_silence,sum_uniform; double sum_brightness2; int sum_delta; #if 1 - if ((commDetectMethod & LOGO /* || startOverAfterLogoInfoAvail==0 */ ) &&! reverseLogoLogic && connect_blocks_with_logo) + if ((commDetectMethod & LOGO) &&! reverseLogoLogic && connect_blocks_with_logo) { //Combine blocks with both logo for (i = block_count-1; i >= 1; i--) { if (CheckFrameForLogo(cblock[i-1].f_end) && - CheckFrameForLogo(cblock[i].f_start) ) + CheckFrameForLogo(cblock[i].f_start) ) { Debug(6, "Joining blocks %i and %i at frame %i because they both have a logo.\n", @@ -1786,21 +1667,6 @@ void CleanLogoBlocks() k = -1; //Checking cblock size ratio - /* - for (i = 0; i < block_count; i++) { - - if (F2L(cblock[i].f_end, cblock[i].f_start) > (int) min_show_segment_length ) - { - if (k != -1 && i > k+1) - { - a = cblock[k].f_end - cblock[k].f_start; - j = cblock[i].f_start - cblock[k].f_end; - Debug(1, "Long/Short cblock ratio for cblock %i till %i is %i percent\n",k, i-1 , (int)(100 * a)/(a+j)); - } - k = i; - } - } - */ avg_brightness = 0; avg_volume = 0; maxi_volume = 0; @@ -1819,8 +1685,6 @@ void CleanLogoBlocks() { for (k = cblock[i].f_start+1; k < cblock[i].f_end; k++) { - -// b = frame[k].brightness; b = abs(frame[k].brightness - frame[k-1].brightness); v = frame[k].volume; if (maxi_volume < v) @@ -1847,9 +1711,7 @@ void CleanLogoBlocks() else cblock[i].schange_rate = 0.0; - cblock[i].stdev = -// sqrt( (n*sum_brightness2 - sum_brightness*sum_brightness)/ (n * (n-1))); - 100* sum_delta / n; + cblock[i].stdev = 100* sum_delta / n; avg_brightness += sum_brightness * 1000; avg_volume += sum_volume; avg_silence += sum_silence; @@ -1862,10 +1724,6 @@ void CleanLogoBlocks() avg_silence /= n; avg_uniform /= n; avg_schange /= n; - -// Debug(1, "Average brightness is %i\n",avg_brightness); -// Debug(1, "Average volume is %i\n",avg_volume); - } #define LOGO_BORDER 5 @@ -1951,7 +1809,7 @@ void OutputDebugWindow(bool showVideo, int frm, int grf) char frametext[80]; bool blackframe, bothtrue, haslogo, uniformframe; int silence=0; -// frm++; + // frm++; if (oldfrm == frm) return; oldfrm = frm; @@ -1960,9 +1818,9 @@ void OutputDebugWindow(bool showVideo, int frm, int grf) if (!vo_init_done) { - if (width == 0 /*|| (loadingCSV && !showVideo) */) + if (width == 0 ) videowidth = width = 800; // MAXWIDTH; - if (height == 0 /*|| (loadingCSV && !showVideo) */) + if (height == 0 ) height = 600-barh; // MAXHEIGHT-30; if (height > 600 || width > 800) { @@ -1980,11 +1838,9 @@ void OutputDebugWindow(bool showVideo, int frm, int grf) owidth = (owidth + 31) & -32; sprintf(t, windowtitle, filename); vo_init(owidth, oheight+barh,t); -// vo_init(owidth, oheight+barh,"Comskip"); owidth = owidth; vo_init_done++; } -// bartop = oheight; if (frm >= frame_count) frm = frame_count-1; if (frm < 1) @@ -1999,7 +1855,6 @@ void OutputDebugWindow(bool showVideo, int frm, int grf) if ( frm > v + zstart - v / 10) zstart = frm - v + v / 10; if (zstart + v > frame_count) zstart = frame_count - v; -// if ( frm > v + zstart) zstart = frm - v; w = ((frm - zstart)* owidth / v); @@ -2008,53 +1863,20 @@ void OutputDebugWindow(bool showVideo, int frm, int grf) if (showVideo && frame_ptr) { memset(graph, 0, owidth*oheight*3); - /* - for (x = 0; x < border; x++) { - for (y = 0; y < oheight; y++) { - PIXEL(x,y+barh) = 0; - PIXEL(owidth - 1 - x,y+barh) = 0; - } - } - */ for (x = 0+border; x < owidth-border; x++) { -// for (y = 0; y < border; y++) { -// PIXEL(x,y+barh) = 0; -// PIXEL(x,oheight - 1 - (y+barh)) = 0; -// } for (y = 0+border; y < oheight-border; y++) { if (x*divider < width && y*divider < height) PIXEL(x,y+barh) = frame_ptr[(y*divider)*(width)+(x*divider)] >> (grf?1:0); -// PIXEL(x,y+barh) = min_br[(y*divider)*width+(x*divider)]; //MAXMIN Logo search - -// PIXEL(x,y+barh) = vert_edges[(y*divider)*width+(x*divider)]; //Edge detect - -// PIXEL(x,y+barh) = (ver_edgecount[(y*divider)*width+(x*divider)]* 4); // Edge count - /* - PIXEL(x,y+barh) =(abs((frame_ptr[(y*divider)*width+(x*divider)] + - frame_ptr[(y*divider)*width+((x+1)*divider)])/2 - - - (frame_ptr[(y*divider)*width+((x+2)*divider)]+ - frame_ptr[(y*divider)*width+((x+3)*divider)])/2 - ) > edge_level_threshold ? 200 : 0); - */ - // graph[((oheight - y)*owidth+x)*3+0] = frame_ptr[y*owidth+x]; - // graph[((oheight - y)*owidth+x)*3+1] = frame_ptr[y*owidth+x]; - // graph[((oheight - y)*owidth+x)*3+2] = frame_ptr[y*owidth+x]; - } - } - // memcpy(&graph[owidth*oheight * 0], frame_ptr, owidth*oheight); - // memcpy(&graph[owidth*oheight * 1], frame_ptr, owidth*oheight); - // memcpy(&graph[owidth*oheight * 2], frame_ptr, owidth*oheight); + } + } if (framearray && grf && ((commDetectMethod & LOGO) || logoInfoAvailable )) { if (aggressive_logo_rejection) s = edge_radius/2; // Cater of mask offset else s = 0; -// w = 0; -// v = 0; if (logoInfoAvailable) // Show logo mask { if (frame[frm].currentGoodEdge > logo_threshold) @@ -2098,7 +1920,6 @@ void OutputDebugWindow(bool showVideo, int frm, int grf) else { memset(graph, 0, owidth*oheight*3); - } @@ -2162,13 +1983,11 @@ void OutputDebugWindow(bool showVideo, int frm, int grf) if (n > 0) { a /= n; -// f /= n; b /= n; s /= n; c /= n; e /= n; } -// PLOT(S, I, X, Y, MAX, L, R,G,B) } } @@ -2176,19 +1995,12 @@ void OutputDebugWindow(bool showVideo, int frm, int grf) if (frame_ptr && framearray) { -// for (x=0; x < owidth; x++) { // Edge counter indicator -// graph[2* owidth + x] = (x < edge_count /8 ? 255 : 0); -// } - x = frame[frm].maxX/divider; if (x == 0) x = owidth; for (i=frame[frm].minX/divider; i < x; i++) // AR lines { SETPIXEL(i, (frame[frm].minY/divider)+barh, 0,0,255); SETPIXEL(i, (frame[frm].maxY/divider)+barh, 0,0,255); - -// graph[frame[frm].minY* owidth + i] = 255; -// graph[frame[frm].maxY* owidth + i] = 255; } for (i=(frame[frm].minY/divider); i < (frame[frm].maxY/divider); i++) // AR lines { @@ -2198,7 +2010,7 @@ void OutputDebugWindow(bool showVideo, int frm, int grf) } - if (framearray /* && commDetectMethod & LOGO */ ) + if (framearray) { for (x = clogoMinX/divider; x < clogoMaxX/divider; x++) // Logo box X @@ -2223,15 +2035,6 @@ void OutputDebugWindow(bool showVideo, int frm, int grf) } } - /* - memset(graph,20,owidth*(oheight+30)*3); - for (i=0; i logo_threshold) haslogo = true; a = (int)((frame[i].ar_ratio - 0.5 - 0.1)*6); // Position of AR line g += (int)(frame[i].currentGoodEdge * 5); gc++; @@ -2304,7 +2105,7 @@ void OutputDebugWindow(bool showVideo, int frm, int grf) for (i = 0; i <= commercial_count; i++) // Inside commercial? { if (zstart+(int)((double)x * v /owidth ) >= commercial[i].start_frame && - zstart+(int)((double)x * v /owidth ) <= commercial[i].end_frame ) + zstart+(int)((double)x * v /owidth ) <= commercial[i].end_frame ) { c = 128; break; @@ -2312,13 +2113,13 @@ void OutputDebugWindow(bool showVideo, int frm, int grf) } } - if (c == 255) // not in a commercial but score above threshold + if (c == 255) // not in a commercial but score above threshold { for (i = 0; i < block_count; i++) { if (zstart+(int)((double)x * v /owidth ) >= cblock[i].f_start && - zstart+(int)((double)x * v /owidth ) <= cblock[i].f_end && - cblock[i].score > global_threshold ) + zstart+(int)((double)x * v /owidth ) <= cblock[i].f_end && + cblock[i].score > global_threshold ) { c = 220; break; @@ -2331,7 +2132,7 @@ void OutputDebugWindow(bool showVideo, int frm, int grf) for (i = 0; i <= reffer_count; i++) // Inside reference? { if (zstart+(int)((double)x * v /owidth ) >= reffer[i].start_frame && - zstart+(int)((double)x * v /owidth ) <= reffer[i].end_frame ) + zstart+(int)((double)x * v /owidth ) <= reffer[i].end_frame ) { r = 0; break; @@ -2347,14 +2148,13 @@ void OutputDebugWindow(bool showVideo, int frm, int grf) else { SETPIXEL(x,y,c,c,c); -// PIXEL(x,y) = c; } g = 5; // Disable goodEdge graph for (i = 0; i < block_count; i++) { if (zstart+(int)((double)x * v /owidth ) >= cblock[i].f_start && - zstart+(int)((double)x * v /owidth ) <= cblock[i].f_end && - cblock[i].correlation > 0 ) // if inside a correlated cblock + zstart+(int)((double)x * v /owidth ) <= cblock[i].f_end && + cblock[i].correlation > 0 ) // if inside a correlated cblock { g=2; break; @@ -2365,7 +2165,6 @@ void OutputDebugWindow(bool showVideo, int frm, int grf) if (haslogo) PIXEL(x,y) = ((y - (bartop + 15) == g)?255:((commDetectMethod & LOGO)? 0 : 128)); else PIXEL(x,y) = ((y - (bartop + 15) == g)?0:255); -// if (y - (bartop + 15) == g) graph[y * owidth + x] = 128; } cb = 255; @@ -2423,8 +2222,6 @@ void OutputDebugWindow(bool showVideo, int frm, int grf) } } vo_draw(graph); - - // sprintf(t, "%8i %8i %1s %1s", frm, framenum_infer, (frame[frm].isblack?"B":" "), (frame[frm].volume commercial[i].end_frame) i++; - // if (i > 0) curframe = commercial[i].end_frame+5; -// while (curframe < frame_count && frame[curframe].isblack) curframe++; -// while (curframe < frame_count && !frame[curframe].isblack) curframe++; - // while (curframe < frame_count && frame[curframe].isblack) curframe++; } else { i = 0; while (i <= reffer_count && curframe > reffer[i].end_frame) i++; - // if (i > 0) curframe = reffer[i].end_frame+5; } curframe -= 5; @@ -2671,17 +2462,12 @@ bool ReviewResult() { i = commercial_count; while (i >= 0 && curframe < commercial[i].start_frame) i--; - // if (i > 0) curframe = commercial[i].start_frame-5; - // while (curframe > 1 && frame[curframe].isblack) curframe--; - // while (curframe > 1 && !frame[curframe].isblack) curframe--; - // while (curframe > 1 && frame[curframe].isblack) curframe--; } else { i = reffer_count; while (i >= 0 && curframe < reffer[i].start_frame) i--; - // if (i > 0) curframe = reffer[i].start_frame-5; } curframe += 5; @@ -2695,7 +2481,6 @@ bool ReviewResult() else { curframe = 0; - } } if (key == 'F') @@ -2717,7 +2502,6 @@ bool ReviewResult() curframe += 10; i = 0; while (i < block_count && curframe > cblock[i].f_end) i++; - // if (i > 0) curframe = cblock[i].f_end+5; curframe -= 10; } @@ -2737,7 +2521,6 @@ bool ReviewResult() curframe -= 10; i = block_count-1; while (i > 0 && curframe < cblock[i].f_start) i--; - // if (i > 0) curframe = cblock[i].f_start-5; curframe += 10; } @@ -2865,9 +2648,7 @@ bool ReviewResult() { if (zfactor < 256 && frame_count / zfactor > owidth) { -// i = (curframe - zstart) * zfactor * owidth/ frame_count; zfactor = zfactor << 1; -// zstart = i * frame_count / owidth / zfactor; zstart = (curframe + zstart) / 2; oldfrm = -1; } @@ -2876,14 +2657,11 @@ bool ReviewResult() { if (zfactor > 1) { -// i = (curframe - zstart) * zfactor * owidth/ frame_count; zfactor = zfactor >> 1; -// zstart = i * frame_count / owidth / zfactor; zstart = zstart - (curframe - zstart); if (zstart < 0) zstart = 0; oldfrm = -1; - } } if (key == 'C') @@ -2953,11 +2731,6 @@ bool ReviewResult() lastcurframe = curframe; } OutputDebugWindow((review_file ? true : false),curframe, grf); -#ifndef GUI - vo_wait(); -// vo_refresh(); -// Sleep((DWORD)100); -#endif } return false; } @@ -2977,21 +2750,16 @@ int DetectCommercials(int f, double pts) return(0); if (!initialized) InitComSkip(); -// frame_count++; frame_count = framenum_real = framenum+1; if (frame_count == 116) frame_count = frame_count; -//Debug(1, "Frame info f=%d, framenum=%d, framenum_real=%d, frame_count=%d\n",f, framenum, framenum_real, frame_count, max_frame_count); - if (framenum_real < 0) return 0; if (play_nice) Sleep(play_nice_sleep); if (framearray) InitializeFrameArray(framenum_real); -// curvolume = RetreiveVolume(framenum_real); curvolume = RetreiveVolume(frame_count); -// if (frame_count != framenum_real) -// Debug(0, "Inconsistent frame numbers\n"); + if (framearray) { frame[frame_count].volume = curvolume; @@ -3032,8 +2800,8 @@ int DetectCommercials(int f, double pts) if (!logoInfoAvailable || (!lastLogoTest && !startOverAfterLogoInfoAvail) ) { if (delay_logo_search == 0 || - (delay_logo_search == 1 && F2T(frame_count) > added_recording * 60) || - (F2T(frame_count) > delay_logo_search)) + (delay_logo_search == 1 && F2T(frame_count) > added_recording * 60) || + (F2T(frame_count) > delay_logo_search)) { FillLogoBuffer(); if (logoBuffersFull) @@ -3047,41 +2815,26 @@ int DetectCommercials(int f, double pts) } if (logoInfoAvailable) { -// logoTrendCounter = num_logo_buffers; -// lastLogoTest = true; -// curLogoTest = true; - // logoTrendStartFrame = logoFrameNum[oldestLogoBuffer]; -// curLogoTest = true; -// lastRealLogoChange = logoFrameNum[oldestLogoBuffer]; -// if (num_logo_buffers >= minHitsForTrend) { -// hindsightLogoState = true; -// } else { -// hindsightLogoState = false; -// } } } } if (logoInfoAvailable) { -// EdgeCount(frame_ptr); -// curLogoTest = logoBuffersFull; currentGoodEdge = CheckStationLogoEdge(frame_ptr); curLogoTest = (currentGoodEdge > logo_threshold); lastLogoTest = ProcessLogoTest(frame_count, curLogoTest, false); if (!lastLogoTest && !startOverAfterLogoInfoAvail && logoBuffersFull) // Lost logo { -// logoInfoAvailable = false; -// secondLogoSearch = true; logoBuffersFull = false; InitLogoBuffers(); newestLogoBuffer = -1; } if (startOverAfterLogoInfoAvail && !loadingCSV && !secondLogoSearch && logo_block_count > 0 && - !lastLogoTest && - F2L(frame_count,logo_block[logo_block_count-1].end) > ( max_commercialbreak * 1.2 ) && - (double)frames_with_logo / (double)frame_count < 0.5 - ) + !lastLogoTest && + F2L(frame_count,logo_block[logo_block_count-1].end) > ( max_commercialbreak * 1.2 ) && + (double)frames_with_logo / (double)frame_count < 0.5 + ) { Debug(6, "\nNo Logo in frames %i to %i, restarting Logo search.\n", logo_block[logo_block_count-1].end, frame_count); // First logo found but no logo found after first commercial cblock so search new logo @@ -3094,40 +2847,32 @@ int DetectCommercials(int f, double pts) } } -// EdgeCount(frame_ptr); -// currentGoodEdge = ((double) edge_count) / 750; - - if (logoInfoAvailable) - if (framearray) frame[frame_count].logo_present = lastLogoTest; - else if (framearray) frame[frame_count].logo_present = 0.0; + if (logoInfoAvailable) + { + if (framearray) + { + frame[frame_count].logo_present = lastLogoTest; + } + } + else if (framearray) + { + frame[frame_count].logo_present = 0.0; + } + if (lastLogoTest) + { frames_with_logo++; - if (framearray) frame[frame_count].currentGoodEdge = currentGoodEdge; - /* - - #define graph frame_ptr - - graph[gy*width + 0] = 100; - graph[gy*width + (frame[frame_count].brightness/2)] = 250; - graph[gy*width + 100] = 100; - graph[gy*width + 100 + (frame[frame_count].minY/6)] = 250; - graph[gy*width + 100 + (frame[frame_count].maxY/6)] = 250; - graph[gy*width + 200] = 100; - graph[gy*width + 200 + (int)(frame[frame_count].currentGoodEdge * 250)] = 250; - graph[gy*width + 300] = 100; - - gy++; - if (gy >= height) gy = 0; - for (i=0; i < width; i++) { - graph[gy* width + i] = 0; - } - */ + } + + if (framearray) + { + frame[frame_count].currentGoodEdge = currentGoodEdge; + } if (((frame_count) & subsample_video) == 0) + { OutputDebugWindow(true,frame_count,true); -// key = 0; -// while (key==0) -// vo_wait(); + } framesprocessed++; scr += 1; @@ -3140,19 +2885,16 @@ int DetectCommercials(int f, double pts) return 0; } - - -int Max(int i,int j) +int max(int i,int j) { return(i>j?i:j); } -int Min(int i,int j) +int min(int i,int j) { return(i ar_histogram[i].ar_ratio - ar_delta && - ar_ratio < ar_histogram[i].ar_ratio + ar_delta) + ar_ratio < ar_histogram[i].ar_ratio + ar_delta) return (ar_histogram[i].ar_ratio); } for (i = 0; i < MAX_ASPECT_RATIOS; i++) { if (ar_ratio > ar_histogram[i].ar_ratio - 2*ar_delta && - ar_ratio < ar_histogram[i].ar_ratio + 2*ar_delta) + ar_ratio < ar_histogram[i].ar_ratio + 2*ar_delta) return (ar_histogram[i].ar_ratio); } for (i = 0; i < MAX_ASPECT_RATIOS; i++) { if (ar_ratio > ar_histogram[i].ar_ratio - 4*ar_delta && - ar_ratio < ar_histogram[i].ar_ratio + 4*ar_delta) + ar_ratio < ar_histogram[i].ar_ratio + 4*ar_delta) return (ar_histogram[i].ar_ratio); } return (0.0); - - - - - - } void FillARHistogram(bool refill) @@ -3279,8 +3015,6 @@ void InsertBlackFrame(int f, int b, int u, int v, int c) { int i; - // if ((black_count==0 || black[black_count-1].frame < logo_block[logo_block_count-1].end )) { - i = 0; while (i < black_count && black[i].frame != f) i++; @@ -3302,7 +3036,6 @@ void InsertBlackFrame(int f, int b, int u, int v, int c) if (f == 49425) f = f; - // InitializeBlackArray(black_count); black_count++; i = black_count-2; while (i >= 0 && black[i].frame > f) @@ -3396,7 +3129,7 @@ bool BuildMasterCommList(void) logoPercentage = (double) frames_with_logo / (double) framenum_real; -// if (max_volume == 0) + // if (max_volume == 0) { #define VOLUME_DELTA 10 @@ -3405,7 +3138,7 @@ bool BuildMasterCommList(void) volume_delta = VOLUME_DELTA; -try_again: + try_again: if (framearray) // Find silence volume level { @@ -3424,9 +3157,9 @@ bool BuildMasterCommList(void) i++; k = 1; while (i-k - VOLUME_PLATAU_SIZE > 1 && - (abs(frame[i-k].volume - frame[i].volume) < volume_delta - //|| frame[i-k].volume < 50 - )) + (abs(frame[i-k].volume - frame[i].volume) < volume_delta + //|| frame[i-k].volume < 50 + )) { k++; } @@ -3437,9 +3170,9 @@ bool BuildMasterCommList(void) } a = 1; while (i+a +VOLUME_PLATAU_SIZE < frame_count && - (abs(frame[i+a].volume - frame[i].volume) < volume_delta - //|| frame[i+a].volume < 50 - )) + (abs(frame[i+a].volume - frame[i].volume) < volume_delta + //|| frame[i+a].volume < 50 + )) { a++; } @@ -3448,7 +3181,7 @@ bool BuildMasterCommList(void) i = i+a; continue; } -// i=8 k=1 a=11 + if (a+k > VOLUME_PLATAU_SIZE && i-k-VOLUME_PLATAU_SIZE > 0 && i+a+VOLUME_PLATAU_SIZE < frame_count) { p_vol = (frame[i-k-4].volume + @@ -3462,14 +3195,9 @@ bool BuildMasterCommList(void) frame[i+a+VOLUME_PLATAU_SIZE-1].volume + frame[i+a+VOLUME_PLATAU_SIZE].volume) / 5; if ( p_vol > frame[i].volume + 220 || n_vol > frame[i].volume + 220 ) - //if ( abs(frame[i-k-2].volume - frame[i].volume) > VOLUME_DELTA*2 || - // abs(frame[i+a+2].volume - frame[i].volume) > VOLUME_DELTA*2) { Debug(8, "Platau@[%d] frames %d, volume %d, distance %d seconds\n", i, k+a, frame[i].volume, (int)F2L(i,j)); j = i; -// for (j = i-k; j < i + a; j++) -// frame[j].isblack |= C_v; - plataus++; silenceHistogram[frame[i].volume/10]++; } @@ -3517,18 +3245,7 @@ bool BuildMasterCommList(void) max_volume = mv; max_silence = ms; } - /* - if (max_silence < min_volume + 30) - max_silence = min_volume + 30; - - if (max_volume < 100) { - if ( max_volume < min_volume + 30) - max_volume = min_volume + 30; - } - else - if (max_volume < min_volume + 100) - max_volume = min_volume + 100; - */ + if (max_volume == 0) { @@ -3537,7 +3254,7 @@ bool BuildMasterCommList(void) #define START_VOLUME 500 count = 21; -scanagain: + scanagain: a = START_VOLUME; k = 0; if (frame[i].volume > 0) @@ -3552,7 +3269,7 @@ bool BuildMasterCommList(void) j = frame[i].volume; k++; if (k > count && a > frame[i-count].volume + 20 && - j > a - 250) + j > a - 250) { i = i - count; a = frame[i].volume; @@ -3590,15 +3307,6 @@ bool BuildMasterCommList(void) } } - /* - - max_volume = 1000; - for (k = black_count - 1; k >= 0; k--) { - if (black[k].volume >= 0 && black[k].volume < max_volume) - max_volume = black[k].volume; - } - max_volume *= 4; - */ Debug ( 1, "Setting max_volume to %i\n", max_volume); } @@ -3606,43 +3314,11 @@ bool BuildMasterCommList(void) { // close out last logo cblock if one is open ProcessLogoTest(frame_count, false, true); - /* - if (loadingCSV) { - prev_logo_threshold = logo_threshold-1.0; - FindLogoThreshold(); - if (fabs(logo_threshold - prev_logo_threshold) > 0.4) { - Debug(2,"Changed logo_threshold to %.2f, recalculating logo timeline\n", logo_threshold); - InitProcessLogoTest(); - for (i = 1; i < frame_count; i++) { - curLogoTest = (frame[i].currentGoodEdge > logo_threshold); - lastLogoTest = ProcessLogoTest(i, curLogoTest); - frame[i].logo_present = lastLogoTest; - if (lastLogoTest) frames_with_logo++; - } - logoPercentage = (double) frames_with_logo / (double) framenum_real; - } - else - logo_threshold = prev_logo_threshold; - - } - */ if (logo_quality == 0.0) FindLogoThreshold(); // Clean up logo blocks - /* - for (i = logo_block_count-2; i >= 0; i--) { - if (F2L(logo_block[i+1].start, logo_block[i].end) < min_commercial_size + (2*shrink_logo)) { - Debug(1, "Logo cblock %d and %d combined because gap (%i s) too short with previous\n", i, i+1, (int)F2L(logo_block[i+1].start, logo_block[i].end )); - logo_block[i+1].start = logo_block[i].start; - for (t = i; t+1 < logo_block_count; t++) { - logo_block[t] = logo_block[t+1]; - } - logo_block_count--; - } - } - */ for (i = logo_block_count-1; i >= 0; i--) { if (F2L(logo_block[i].end, logo_block[i].start) < min_commercial_size - 2*shrink_logo) @@ -3671,7 +3347,7 @@ bool BuildMasterCommList(void) 3, "Frame %6i - Cutpoint added when Logo disappears\n", j - ); + ); continue; } @@ -3689,8 +3365,6 @@ bool BuildMasterCommList(void) rsc = 255; while (frame[j].volume >= max_volume && j < t) { -// if (rsc > frame[j].schange_percent) -// rsc = frame[j].schange_percent; j++; } c = 10; @@ -3734,8 +3408,6 @@ bool BuildMasterCommList(void) maxsc = rsc; cp = cpf; } -// cp = j; -// j=t; } if (cp != 0) { @@ -3744,7 +3416,7 @@ bool BuildMasterCommList(void) 3, "Frame %6i - Cutpoint added %i seconds after Logo disappears at change percentage of %d\n", cp, (int)F2L(cp, logo_block[i].end), maxsc - ); + ); } } } @@ -3765,7 +3437,7 @@ bool BuildMasterCommList(void) 3, "Frame %6i - Cutpoint added when Logo appears\n", j - ); + ); continue; } @@ -3783,8 +3455,6 @@ bool BuildMasterCommList(void) rsc = 255; while (frame[j].volume >= max_volume && j > t) { -// if (rsc > frame[j].schange_percent) -// rsc = frame[j].schange_percent; j--; } c = 10; @@ -3829,8 +3499,6 @@ bool BuildMasterCommList(void) maxsc = rsc; cp = cpf; } -// cp = j; -// j=t; } if (cp != 0) { @@ -3839,14 +3507,10 @@ bool BuildMasterCommList(void) 3, "Frame %6i - Cutpoint added %i seconds before Logo disappears at change percentage of %d\n", cp, (int)F2L(cp, logo_block[i].end), maxsc - ); + ); } } } -// if (logoPercentage > .15 && logoPercentage < .32 ) { -// reverseLogoLogic = true; -// logoPercentage = 1 - logoPercentage; -// } if (logoPercentage < logo_fraction - 0.05 || logoPercentage > logo_percentile) { Debug(1, "\nNot enough or too much logo's found (%.2f), disabling the use of Logo detection\n",logoPercentage ); @@ -3898,7 +3562,7 @@ bool BuildMasterCommList(void) } else { - if (silence_count > min_silence /* * (int)fps */ && silence_count < 5 * fps) + if (silence_count > min_silence && silence_count < 5 * fps) { if ( very_low_volume_count > (int)(silence_count * 0.7) || schange_found || frame[i].schange_percent < schange_threshold) @@ -3907,22 +3571,20 @@ bool BuildMasterCommList(void) summed_volume1 = 0; for (j = max(silence_start - SILENCE_CHECK,1); j < silence_start; j++) { -// if (summed_volume1 < frame[j].volume) summed_volume1 += frame[j].volume; } summed_volume1 /= min(SILENCE_CHECK, silence_start+1) ; summed_volume2 = 0; for (j = i; j < min(i+SILENCE_CHECK, frame_count); j++) { -// if (summed_volume2 < frame[j].volume) summed_volume2 += frame[j].volume; } summed_volume2 /= min(SILENCE_CHECK, frame_count - i + 1); if ((summed_volume1 > 0.9*max_volume && summed_volume2 > 0.9*max_volume && low_volume_count > min_silence ) || - (summed_volume1 > 2*max_volume && summed_volume2 > 2*max_volume) || - (summed_volume1 > 4*max_volume || summed_volume2 > 4*max_volume) || - very_low_volume_count > min_silence - ) + (summed_volume1 > 2*max_volume && summed_volume2 > 2*max_volume) || + (summed_volume1 > 4*max_volume || summed_volume2 > 4*max_volume) || + very_low_volume_count > min_silence + ) { if (schange_frame == 0) schange_frame = i; @@ -3937,10 +3599,6 @@ bool BuildMasterCommList(void) frame[schange_frame].isblack |= C_v; InsertBlackFrame(schange_frame,frame[schange_frame].brightness,frame[schange_frame].uniform,frame[schange_frame].volume, C_v); #endif - //for (j = silence_start /*i - min_silence /* * (int)fps */; j <= i; j++) { - // frame[j].isblack |= C_v; - // InsertBlackFrame(j,frame[j].brightness,frame[j].uniform,frame[j].volume, C_v); - //} } } } @@ -3989,7 +3647,7 @@ bool BuildMasterCommList(void) dblSecondsToStrMinutes(F2L(ar_block[i].end, ar_block[i].start) ), ar_block[i].width, ar_block[i].height, ar_block[i].minX, ar_block[i].minY, ar_block[i].maxX, ar_block[i].maxY - ); + ); } // Calculate histogram with noisy aspect ratios @@ -4001,7 +3659,7 @@ bool BuildMasterCommList(void) for (j = i+1; j < MAX_ASPECT_RATIOS; j++) { if (ar_histogram[j].ar_ratio < ar_histogram[i].ar_ratio+ar_delta && - ar_histogram[j].ar_ratio > ar_histogram[i].ar_ratio-ar_delta ) + ar_histogram[j].ar_ratio > ar_histogram[i].ar_ratio-ar_delta ) ar_histogram[j].ar_ratio = ar_histogram[i].ar_ratio; } @@ -4018,7 +3676,7 @@ bool BuildMasterCommList(void) dominant_ar = ar_histogram[0].ar_ratio; -again: + again: // Clean up ar cblock list for (i = ar_block_count - 1; i > 0; i--) @@ -4032,34 +3690,16 @@ bool BuildMasterCommList(void) "Undefining AR cblock %i because it is too short\n", i, dblSecondsToStrMinutes(length / fps) - ); + ); ar_block[i].ar_ratio = AR_UNDEF; goto again; } - /* - if (ar_block[i].ar_ratio == AR_UNDEF && length < 5*(int)fps) { - ar_block[i - 1].end = ar_block[i].end; - ar_block_count--; - Debug( - 6, - "Deleting AR cblock %i because it is too short\n", - i, - dblSecondsToStrMinutes(length / fps) - ); - for (j = i; j < ar_block_count; j++) { - ar_block[j].start = ar_block[j + 1].start; - ar_block[j].end = ar_block[j + 1].end; - ar_block[j].ar_ratio = ar_block[j + 1].ar_ratio; - } - goto again; - } - */ #if 1 if (commDetectMethod & LOGO && ar_block[i - 1].ar_ratio != AR_UNDEF && - ar_block[i].ar_ratio > ar_block[i - 1].ar_ratio && - CheckFrameForLogo(ar_block[i-1].end) && - CheckFrameForLogo(ar_block[i].start) ) + ar_block[i].ar_ratio > ar_block[i - 1].ar_ratio && + CheckFrameForLogo(ar_block[i-1].end) && + CheckFrameForLogo(ar_block[i].start) ) { if (ar_block[i].end - ar_block[i].start > ar_block[i-1].end - ar_block[i-1].start) { @@ -4077,14 +3717,13 @@ bool BuildMasterCommList(void) i, i, dblSecondsToStrMinutes(length / fps) - ); + ); for (j = i; j < ar_block_count; j++) { ar_block[j] = ar_block[j + 1]; } goto again; } -// #endif if ( i == 1 && ar_block[i-1].ar_ratio == AR_UNDEF) { @@ -4101,7 +3740,7 @@ bool BuildMasterCommList(void) } if (( ar_block[i].ar_ratio - ar_block[i - 1].ar_ratio < ar_delta && - ar_block[i].ar_ratio - ar_block[i - 1].ar_ratio > -ar_delta )) + ar_block[i].ar_ratio - ar_block[i - 1].ar_ratio > -ar_delta )) { ar_block[i - 1].end = ar_block[i].end; ar_block_count--; @@ -4114,8 +3753,8 @@ bool BuildMasterCommList(void) } if ( ar_block[i-1].ar_ratio == AR_UNDEF && i > 1 && - ar_block[i].ar_ratio - ar_block[i - 2].ar_ratio < ar_delta && - ar_block[i].ar_ratio - ar_block[i - 2].ar_ratio > -ar_delta ) + ar_block[i].ar_ratio - ar_block[i - 2].ar_ratio < ar_delta && + ar_block[i].ar_ratio - ar_block[i - 2].ar_ratio > -ar_delta ) { ar_block[i - 2].end = ar_block[i].end; ar_block_count -= 2; @@ -4143,7 +3782,7 @@ bool BuildMasterCommList(void) dblSecondsToStrMinutes(F2L(ar_block[i].end, ar_block[i].start) ), ar_block[i].width, ar_block[i].height, ar_block[i].minX, ar_block[i].minY, ar_block[i].maxX, ar_block[i].maxY - ); + ); } } @@ -4182,7 +3821,7 @@ bool BuildMasterCommList(void) cc_text[i].end_frame, cc_text[i].text_len, cc_text[i].text - ); + ); } } @@ -4209,7 +3848,6 @@ bool BuildMasterCommList(void) log_file = NULL; } - if (ccCheck && processCC) { char temp[MAX_PATH]; @@ -4242,7 +3880,7 @@ bool BuildMasterCommList(void) } } -// free(frame); + // free(frame); return (foundCommercials); } @@ -4255,101 +3893,14 @@ bool WithinDivisibleTolerance(double test_number, double divisor, double toleran return ((remainder >= 0) && (remainder <= (2 * tolerance))); } -/* -void CalculateCorrelation() -{ - int i,j; - double position; - double length; - double min_weight; - double pivot; - double correlation; - double distance; - double weight; - - for (i = 0; i < block_count; i++) { - pivot = ((double)(cblock[i].f_start+cblock[i].f_end)/(2*frame_count)); - length = ((double)(cblock[i].f_end - cblock[i].f_start)/frame_count); - correlation = 0; - min_weight = length; - for (j = 0; j < block_count; j++) { - if (i != j) { - distance = fabs(pivot - ((double)(cblock[j].f_start+cblock[j].f_end)/(2*frame_count))); - weight = ((double)(cblock[j].f_end - cblock[j].f_start)/frame_count); - if (min_weight > weight) - min_weight = weight; - correlation += (1 / (distance * distance) ) / (weight ); - } - } - cblock[i].correlation = correlation / length * (min_weight*min_weight*min_weight); - } - -} - -void CalculateFit() -{ - int i,j; - int start; - double position; - double length; - double min_weight; - double pivot; - double correlation; - double prev_correlation = 0; - double distance; - double weight; - - for (i = 0; i < block_count; i++) { - start = cblock[i].f_start; - correlation = 0; - j = i+1; - if (F2L(cblock[i].f_end, cblock[i].f_start) < max_commercial_size && j < block_count) { - while ( F2L(cblock[j].f_end, cblock[j].f_start) < max_commercial_size && j < block_count - 1 && F2L(cblock[j].f_end, start) < max_commercialbreak) - j++; - if ( F2L(cblock[j].f_start, start) > min_commercialbreak ) { - correlation = j - i; - } - } - if (correlation > prev_correlation) - prev_correlation = correlation; - cblock[i].correlation = prev_correlation; - prev_correlation -= 1; - } -} - -*/ - -// Match string ([*+]*[CS]+)*M([*+]*[CS]+)* - int beforeblocks[100]; int afterblocks[100]; -/* -int MatchBlocks(int k, char *t) -{ - int match = false; - char after[80]; - int i; - int j; - - i = 0; - while (t[i] != 0 && t[i] != 'M') - i++; - if (t[i] == 0) - return(0); - j = 0; - while (t[i+j+1] != 0) - after[j] = t[i+j+1]; - j++; -} -*/ - int length_order[2000]; int length_sorted = false; int min_val[10]; int max_val[10]; int delta_val[10]; - void BuildPunish() { int i; @@ -4361,7 +3912,7 @@ void BuildPunish() { for (i=0 ; i< block_count; i++) length_order [i] = i; -again: + again: for (j=0; j < block_count; j++) { for (i=j ; i< block_count; i++) @@ -4389,13 +3940,13 @@ void BuildPunish() l += cblock[length_order[i]].length * fps; #define MINMAX(I,FIELD) { if (min_val[I] > cblock[length_order[i]].FIELD) min_val[I] = cblock[length_order[i]].FIELD; if (max_val[I] < cblock[length_order[i]].FIELD) max_val[I] = cblock[length_order[i]].FIELD; } MINMAX(0, brightness) - MINMAX(1, volume) - MINMAX(2, silence) - MINMAX(3, uniform) - MINMAX(4, ar_ratio) - MINMAX(5, schange_rate) - if (l > cblock[block_count - 1].f_end* 70 / 100) - break; + MINMAX(1, volume) + MINMAX(2, silence) + MINMAX(3, uniform) + MINMAX(4, ar_ratio) + MINMAX(5, schange_rate) + if (l > cblock[block_count - 1].f_end* 70 / 100) + break; } } @@ -4422,7 +3973,6 @@ void WeighBlocks(void) if (commDetectMethod & AR) { -// showAvgAR = AverageARForBlock(1, framesprocessed); SetARofBlocks(); } @@ -4430,9 +3980,9 @@ void WeighBlocks(void) for (i = 0; i < block_count-2; i++) { if (CUTCAUSE(cblock[i].cause) == C_a && CUTCAUSE(cblock[i+1].cause) == C_a && - cblock[i+1].length < 3.0 && - fabs(cblock[i].ar_ratio - cblock[i+2].ar_ratio) < ar_delta - ) + cblock[i+1].length < 3.0 && + fabs(cblock[i].ar_ratio - cblock[i+2].ar_ratio) < ar_delta + ) { Debug(2, "Deleting cblock %d starting at frame %d because too short and same AR before and after\n", i+1, cblock[i+1].f_start); cblock[i].b_tail = cblock[i+2].b_tail; @@ -4477,9 +4027,6 @@ void WeighBlocks(void) cblock[i].logo = 0; } -// CalculateCorrelation(); -// CalculateFit(); - CleanLogoBlocks(); // Can join blocks, so recalculate logo if (commDetectMethod & SCENE_CHANGE) @@ -4509,24 +4056,15 @@ void WeighBlocks(void) else if (score_percentile < 0.5) score_percentile = 0.71; -// if ((commDetectMethod & LOGO) && logoPercentage > logo_fraction && logoPercentage < logo_percentile && logo_present_modifier != 1.0) -// excessive_length_modifier = 1; // TESTING!!!!!!!!!!!!!!!!!! - Debug(5, "\nFuzzy scoring of the blocks\n---------------------------\n"); - - for (i = 0; i < block_count; i++) { - if (i == 0 || true /*(cblock[i-1].cause & (C_b | C_u | C_v)) || cut_on_ar_change == 2 || (!(commDetectMethod & BLACK_FRAME) && (cblock[j].cause & C_v)) */) + if (i == 0 || true) { j = i; combined_length = cblock[i].length; -// while (j < block_count && ((cblock[j].cause & C_a) && (cut_on_ar_change == 1) && ! (!(commDetectMethod & BLACK_FRAME) && (cblock[j].cause & C_v)) ) ) { -// j++; -// combined_length += cblock[j].length; -// } -expand: + expand: k = j; if (i > 0 && ((CUTCAUSE(cblock[i-1].cause) == C_b) || (CUTCAUSE(cblock[i-1].cause) == C_u))) combined_length -= cblock[i].b_head / fps / 4 ; @@ -4544,7 +4082,6 @@ void WeighBlocks(void) Debug(2, "Block %i has strict standard length for a commercial.\n", j); Debug(3, "Block %i score:\tBefore - %.2f\t", j, cblock[j].score); cblock[j].score *= length_strict_modifier; -// cblock[j].score *= length_strict_modifier; Debug(3, "After - %.2f\n", cblock[j].score); cblock[j].cause |= C_STRICT; cblock[j].more |= C_STRICT; @@ -4575,53 +4112,18 @@ void WeighBlocks(void) } } j = k; -// if (j+1 < block_count && cblock[i].strict == 0 && cblock[j+1].length < 5.0) { -// j++; -// combined_length += cblock[j].length; -// goto expand; -// } } - /* - tolerance = (cblock[i].bframe_count + cblock[i + 1].bframe_count + 6) / fps; - if (IsStandardCommercialLength(cblock[i].length, tolerance, true)) { - cblock[i].strict = 2; - Debug(2, "Block %i has strict standard length for a commercial.\n", i); - Debug(3, "Block %i score:\tBefore - %.2f\t", i, cblock[i].score); - cblock[i].score *= length_strict_modifier; - cblock[i].score *= length_strict_modifier; - Debug(3, "After - %.2f\n", cblock[i].score); - cblock[i].cause |= C_STRICT; - } else if (IsStandardCommercialLength(cblock[i].length, tolerance, false)) { - cblock[i].strict = 1; - Debug(2, "Block %i has non-strict standard length for a commercial.\n", i); - Debug(3, "Block %i score:\tBefore - %.2f\t", i, cblock[i].score); - cblock[i].score *= length_nonstrict_modifier; - cblock[i].score = (cblock[i].score > max_score) ? max_score : cblock[i].score; - Debug(3, "After - %.2f\n", cblock[i].score); - cblock[i].cause |= C_NONSTRICT; - } else - cblock[i].strict = 0; - */ #if 1 if (cblock[i].combined_count < max_combined_count) { -// Debug(3, "Attempting to combine cblock %i\n", i); combined_length = cblock[i].length; for (j = 1; j < block_count - i; j++) { if (IsStandardCommercialLength(cblock[i + j].length - (cblock[i+j].b_head + cblock[i + j + 1].b_head) / fps, (cblock[i+j].bframe_count + cblock[i + j + 1].bframe_count + 2) / fps, true)) { - /* Debug( - 3, - "Not attempting to forward combine blocks %i to %i because cblock %i is strict commercial.\n", - i, - i + j, - i + j - ); - */ -// break; + } if ((cblock[i + j].combined_count > max_combined_count) || (cblock[i].combined_count > max_combined_count)) { @@ -4632,7 +4134,7 @@ void WeighBlocks(void) i + j, i + j, cblock[i + j].combined_count - ); + ); breakforcombine = true; break; } @@ -4641,7 +4143,6 @@ void WeighBlocks(void) combined_length += cblock[i + j].length; if (combined_length > (max_commercial_size) + tolerance) { -// Debug(2, "Not trying to combine blocks %i thru %i due to excessive length - %f\n", i, i + j, combined_length); break; } else @@ -4656,7 +4157,7 @@ void WeighBlocks(void) i + j, combined_length, tolerance - ); + ); for (k = 0; k <= j; k++) { Debug(3, "Block %i score:\tBefore - %.2f\t", i + k, cblock[i + k].score); @@ -4678,7 +4179,7 @@ void WeighBlocks(void) i + j, combined_length, tolerance - ); + ); for (k = 0; k <= j; k++) { Debug(3, "Block %i score:\tBefore - %.2f\t", i + k, cblock[i + k].score); @@ -4695,7 +4196,6 @@ void WeighBlocks(void) if (breakforcombine) { -// Debug(3, "Block %i Break for forward combined limit\n", i); breakforcombine = false; } @@ -4704,14 +4204,6 @@ void WeighBlocks(void) { if (IsStandardCommercialLength(cblock[i - j].length - (cblock[i-j].b_head + cblock[i - j + 1].b_head)/fps, (cblock[i-j].bframe_count + cblock[i - j + 1].bframe_count + 2) / fps, true)) { - /* Debug( - 3, - "Not attempting to forward combine blocks %i to %i because cblock %i is strict commercial.\n", - i - j, - i, - i - j - ); - */ break; } if ((cblock[i - j].combined_count > max_combined_count) || (cblock[i].combined_count > max_combined_count)) @@ -4723,7 +4215,7 @@ void WeighBlocks(void) i, i - j, cblock[i - j].combined_count - ); + ); breakforcombine = true; break; } @@ -4732,7 +4224,6 @@ void WeighBlocks(void) combined_length += cblock[i - j].length; if (combined_length >= max_commercial_size) { -// Debug(2, "Not trying to backward combine blocks %i thru %i due to excessive length - %f\n", i - j, i, combined_length); break; } else @@ -4746,7 +4237,7 @@ void WeighBlocks(void) i, combined_length, tolerance - ); + ); for (k = 0; k <= j; k++) { Debug(3, "Block %i score:\tBefore - %.2f\t", i - k, cblock[i - k].score); @@ -4767,7 +4258,7 @@ void WeighBlocks(void) i, combined_length, tolerance - ); + ); for (k = 0; k <= j; k++) { Debug(3, "Block %i score:\tBefore - %.2f\t", i - k, cblock[i - k].score); @@ -4785,7 +4276,6 @@ void WeighBlocks(void) if (breakforcombine) { -// Debug(3, "Block %i Break for backward combined limit\n", i); breakforcombine = false; } } @@ -4798,23 +4288,12 @@ void WeighBlocks(void) Debug(2, "Block %i has logo.\n", i); Debug(3, "Block %i score:\tBefore - %.2f\t", i, cblock[i].score); cblock[i].score *= logo_present_modifier; -// cblock[i].score *= (logo_present_modifier*cblock[i].logo) + (1-cblock[i].logo); cblock[i].score = (cblock[i].score > max_score) ? max_score : cblock[i].score; Debug(3, "After - %.2f\n", cblock[i].score); cblock[i].cause |= C_LOGO; cblock[i].less |= C_LOGO; - } - /* else if (cblock[i].logo > 0.10) { - Debug(2, "Block %i has logo.\n", i); - Debug(3, "Block %i score:\tBefore - %.2f\t", i, cblock[i].score); - cblock[i].score *= logo_present_modifier; - // cblock[i].score *= (logo_present_modifier*cblock[i].logo) + (1-cblock[i].logo); - cblock[i].score = (cblock[i].score > max_score) ? max_score : cblock[i].score; - Debug(3, "After - %.2f\n", cblock[i].score); - cblock[i].cause |= C_LOGO; - cblock[i].less |= C_LOGO; - } - */ else if (punish_no_logo && cblock[i].logo < 0.05 && logoPercentage > logo_fraction) + } + else if (punish_no_logo && cblock[i].logo < 0.05 && logoPercentage > logo_fraction) { Debug(2, "Block %i has no logo.\n", i); Debug(3, "Block %i score:\tBefore - %.2f\t", i, cblock[i].score); @@ -4934,528 +4413,347 @@ void WeighBlocks(void) } } -// cblock[i].logo > 0.5 && F2L(cblock[i].f_end, cblock[i].f_start) > min_show_segment_length #if 0 // if length < min_show_segment_length, score = 150% if (cblock[i].length < min_show_segment_length && cblock[i].logo < 0.2 )) - { - Debug(2, "Block %i is shorter then minimum show segment.\n", i); - Debug(3, "Block %i score:\tBefore - %.2f\t", i, cblock[i].score); - cblock[i].score *= 1.5; - cblock[i].score = (cblock[i].score > max_score) ? max_score : cblock[i].score; - Debug(3, "After - %.2f\n", cblock[i].score); - } + { + Debug(2, "Block %i is shorter then minimum show segment.\n", i); + Debug(3, "Block %i score:\tBefore - %.2f\t", i, cblock[i].score); + cblock[i].score *= 1.5; + cblock[i].score = (cblock[i].score > max_score) ? max_score : cblock[i].score; + Debug(3, "After - %.2f\n", cblock[i].score); + } #endif #if 0 - if (framearray && cblock[i].length < max_commercialbreak && - cblock[i].brightness < avg_brightness) - { - Debug(2, "Block %i is short but has low brightness.\n", i); - Debug(3, "Block %i score:\tBefore - %.2f\t", i, cblock[i].score); - cblock[i].score *= dark_block_modifier; - cblock[i].score = (cblock[i].score > max_score) ? max_score : cblock[i].score; - Debug(3, "After - %.2f\n", cblock[i].score); - } + if (framearray && cblock[i].length < max_commercialbreak && + cblock[i].brightness < avg_brightness) + { + Debug(2, "Block %i is short but has low brightness.\n", i); + Debug(3, "Block %i score:\tBefore - %.2f\t", i, cblock[i].score); + cblock[i].score *= dark_block_modifier; + cblock[i].score = (cblock[i].score > max_score) ? max_score : cblock[i].score; + Debug(3, "After - %.2f\n", cblock[i].score); + } #endif - // if length > max_commercial_size * fps, score = 10% - if (cblock[i].length > 2 * min_show_segment_length) + // if length > max_commercial_size * fps, score = 10% + if (cblock[i].length > 2 * min_show_segment_length) + { + Debug(2, "Block %i has twice excess length.\n", i); + Debug(3, "Block %i score:\tBefore - %.2f\t", i, cblock[i].score); + cblock[i].score *= excessive_length_modifier * excessive_length_modifier; + cblock[i].score = (cblock[i].score > max_score) ? max_score : cblock[i].score; + Debug(3, "After - %.2f\n", cblock[i].score); + cblock[i].cause |= C_EXCEEDS; + cblock[i].less |= C_EXCEEDS; + } + else + + if (cblock[i].length > min_show_segment_length) { - Debug(2, "Block %i has twice excess length.\n", i); + Debug(2, "Block %i has excess length.\n", i); Debug(3, "Block %i score:\tBefore - %.2f\t", i, cblock[i].score); - cblock[i].score *= excessive_length_modifier * excessive_length_modifier; + cblock[i].score *= excessive_length_modifier; cblock[i].score = (cblock[i].score > max_score) ? max_score : cblock[i].score; Debug(3, "After - %.2f\n", cblock[i].score); cblock[i].cause |= C_EXCEEDS; cblock[i].less |= C_EXCEEDS; } - else - if (cblock[i].length > min_show_segment_length) + // Mod score based on CC type + if (processCC) + { + if (most_cc_type == NONE) + { + if (cblock[i].cc_type != NONE) { - Debug(2, "Block %i has excess length.\n", i); - Debug(3, "Block %i score:\tBefore - %.2f\t", i, cblock[i].score); - cblock[i].score *= excessive_length_modifier; + Debug(3, "CC's exist in a non-CC'd show - Block %i score:\tBefore - %.2f\t", i, cblock[i].score); + cblock[i].score *= cc_commercial_type_modifier * 2; + Debug(3, "After - %.2f\n", cblock[i].score); cblock[i].score = (cblock[i].score > max_score) ? max_score : cblock[i].score; + } + } + else + { + if (cblock[i].cc_type == most_cc_type) + { + Debug(3, "CC's correct type - Block %i score:\tBefore - %.2f\t", i, cblock[i].score); + cblock[i].score *= cc_correct_type_modifier; Debug(3, "After - %.2f\n", cblock[i].score); - cblock[i].cause |= C_EXCEEDS; - cblock[i].less |= C_EXCEEDS; + cblock[i].score = (cblock[i].score > max_score) ? max_score : cblock[i].score; } - - // Mod score based on scene change rate - /* - if ( (commDetectMethod & SCENE_CHANGE) && (cblock[i].schange_count > 2) && (cblock[i].length > 3)) { - #if 0 - schange_modifier = (cblock[i].schange_rate / avg_schange); - schange_modifier = (schange_modifier > min_schange_modifier) ? schange_modifier : min_schange_modifier; - schange_modifier = (schange_modifier < max_schange_modifier) ? schange_modifier : max_schange_modifier; - Debug(3, "SC modifier - %.3f\tBlock %i score:\tBefore - %.2f\t", schange_modifier, i, cblock[i].score); - cblock[i].score *= schange_modifier; - cblock[i].score = (cblock[i].score > max_score) ? max_score : cblock[i].score; - Debug(3, "\tSC\tAfter - %.2f\n", cblock[i].score); - #else - schange_modifier = (cblock[i].schange_rate / avg_schange); - if (schange_modifier > 2.0 || schange_modifier < 0.5 ) { - schange_modifier = (schange_modifier > min_schange_modifier) ? schange_modifier : min_schange_modifier; - schange_modifier = (schange_modifier < max_schange_modifier) ? schange_modifier : max_schange_modifier; - Debug(3, "SC modifier - %.3f\tBlock %i score:\tBefore - %.2f\t", schange_modifier, i, cblock[i].score); - cblock[i].score *= schange_modifier; - cblock[i].score = (cblock[i].score > max_score) ? max_score : cblock[i].score; - Debug(3, "\tSC\tAfter - %.2f\n", cblock[i].score); - cblock[i].cause |= C_SC; - } - #endif - - } - */ - // Mod score based on CC type - if (processCC) - { - if (most_cc_type == NONE) + else if (cblock[i].cc_type == COMMERCIAL) { - if (cblock[i].cc_type != NONE) - { - Debug(3, "CC's exist in a non-CC'd show - Block %i score:\tBefore - %.2f\t", i, cblock[i].score); - cblock[i].score *= cc_commercial_type_modifier * 2; - Debug(3, "After - %.2f\n", cblock[i].score); - cblock[i].score = (cblock[i].score > max_score) ? max_score : cblock[i].score; - } + Debug(3, "CC's commercial type - Block %i score:\tBefore - %.2f\t", i, cblock[i].score); + cblock[i].score *= cc_commercial_type_modifier; + Debug(3, "After - %.2f\n", cblock[i].score); + cblock[i].score = (cblock[i].score > max_score) ? max_score : cblock[i].score; + } + else if (cblock[i].cc_type == NONE) + { + Debug(3, "No CC's - Block %i score:\tBefore - %.2f\t", i, cblock[i].score); + cblock[i].score *= (((cc_wrong_type_modifier-1.0)/2)+1.0); + Debug(3, "After - %.2f\n", cblock[i].score); + cblock[i].score = (cblock[i].score > max_score) ? max_score : cblock[i].score; } else { - if (cblock[i].cc_type == most_cc_type) - { - Debug(3, "CC's correct type - Block %i score:\tBefore - %.2f\t", i, cblock[i].score); - cblock[i].score *= cc_correct_type_modifier; - Debug(3, "After - %.2f\n", cblock[i].score); - cblock[i].score = (cblock[i].score > max_score) ? max_score : cblock[i].score; - } - else if (cblock[i].cc_type == COMMERCIAL) - { - Debug(3, "CC's commercial type - Block %i score:\tBefore - %.2f\t", i, cblock[i].score); - cblock[i].score *= cc_commercial_type_modifier; - Debug(3, "After - %.2f\n", cblock[i].score); - cblock[i].score = (cblock[i].score > max_score) ? max_score : cblock[i].score; - } - else if (cblock[i].cc_type == NONE) - { - Debug(3, "No CC's - Block %i score:\tBefore - %.2f\t", i, cblock[i].score); - cblock[i].score *= (((cc_wrong_type_modifier-1.0)/2)+1.0); - Debug(3, "After - %.2f\n", cblock[i].score); - cblock[i].score = (cblock[i].score > max_score) ? max_score : cblock[i].score; - } - else - { - Debug(3, "CC's wrong type - Block %i score:\tBefore - %.2f\t", i, cblock[i].score); - cblock[i].score *= cc_wrong_type_modifier; - Debug(3, "After - %.2f\n", cblock[i].score); - cblock[i].score = (cblock[i].score > max_score) ? max_score : cblock[i].score; - } + Debug(3, "CC's wrong type - Block %i score:\tBefore - %.2f\t", i, cblock[i].score); + cblock[i].score *= cc_wrong_type_modifier; + Debug(3, "After - %.2f\n", cblock[i].score); + cblock[i].score = (cblock[i].score > max_score) ? max_score : cblock[i].score; } } + } - // Mod score based on AR -// if (commDetectMethod & AR) { - cblock[i].ar_ratio = AverageARForBlock(cblock[i].f_start, cblock[i].f_end); - if ((dominant_ar - cblock[i].ar_ratio >= ar_delta || - dominant_ar - cblock[i].ar_ratio <= - ar_delta) -// cblock[i].length < min_show_segment_length -// && (cblock[i].length > 5.0 || cblock[i].ar_ratio - ar_delta < dominant_ar) - ) - { - Debug(2, "Block %i AR (%.2f) is different from dominant AR(%.2f).\n",i,cblock[i].ar_ratio, dominant_ar); - Debug(3, "Block %i score:\tBefore - %.2f\t", i, cblock[i].score); - cblock[i].score *= ar_wrong_modifier; - Debug(3, "After - %.2f\n", cblock[i].score); - cblock[i].cause |= C_AR; - cblock[i].more |= C_AR; - } -// } + // Mod score based on AR + cblock[i].ar_ratio = AverageARForBlock(cblock[i].f_start, cblock[i].f_end); + if ((dominant_ar - cblock[i].ar_ratio >= ar_delta || + dominant_ar - cblock[i].ar_ratio <= - ar_delta) + ) + { + Debug(2, "Block %i AR (%.2f) is different from dominant AR(%.2f).\n",i,cblock[i].ar_ratio, dominant_ar); + Debug(3, "Block %i score:\tBefore - %.2f\t", i, cblock[i].score); + cblock[i].score *= ar_wrong_modifier; + Debug(3, "After - %.2f\n", cblock[i].score); + cblock[i].cause |= C_AR; + cblock[i].more |= C_AR; } +} - if (processCC) +if (processCC) +{ + if (ProcessCCDict()) { - if (ProcessCCDict()) - { - Debug(4, "Dictionary processed successfully\n"); - } - else - { - Debug(4, "Dictionary not processed successfully\n"); - } + Debug(4, "Dictionary processed successfully\n"); } - for (i = 0; i < block_count; i++) + else { -// OutputStrict(cblock[i].length, (double) cblock[i].strict, 0.0); + Debug(4, "Dictionary not processed successfully\n"); } +} - - if (!(disable_heuristics & (1 << (2 - 1)))) +if (!(disable_heuristics & (1 << (2 - 1)))) +{ + for (i = 0; i < block_count-2; i++) { - for (i = 0; i < block_count-2; i++) + if ( ((cblock[i].cause & C_STRICT) && (cblock[i].cause & (C_b | C_u | C_v | C_r)) ) && + cblock[i+1].score > 1.05 && cblock[i+1].length < 4.8 && + cblock[i+2].score < 1.0 && cblock[i+2].length > min_show_segment_length + ) { - if ( ((cblock[i].cause & C_STRICT) && (cblock[i].cause & (C_b | C_u | C_v | C_r)) ) && - cblock[i+1].score > 1.05 && cblock[i+1].length < 4.8 && - cblock[i+2].score < 1.0 && cblock[i+2].length > min_show_segment_length - ) - { - cblock[i+1].score = 0.5; - Debug(3, "H2 Added cblock %i because short and after strict commercial.\n", i+1); - cblock[i+1].cause |= C_H2; - cblock[i+1].less |= C_H2; - } + cblock[i+1].score = 0.5; + Debug(3, "H2 Added cblock %i because short and after strict commercial.\n", i+1); + cblock[i+1].cause |= C_H2; + cblock[i+1].less |= C_H2; } - for (i = 0; i < block_count-2; i++) + } + for (i = 0; i < block_count-2; i++) + { + if ( ((cblock[i+2].cause & C_STRICT) && (cblock[i+1].cause & (C_b | C_u | C_v | C_r)) ) && + cblock[i+1].score > 1.05 && cblock[i+1].length < 4.8 && + cblock[i].score < 1.0 && cblock[i].length > min_show_segment_length + ) { - if ( ((cblock[i+2].cause & C_STRICT) && (cblock[i+1].cause & (C_b | C_u | C_v | C_r)) ) && - cblock[i+1].score > 1.05 && cblock[i+1].length < 4.8 && - cblock[i].score < 1.0 && cblock[i].length > min_show_segment_length - ) - { - cblock[i+1].score = 0.5; - Debug(3, "H2 Added cblock %i because after show, short and before strict commercial.\n", i+1); - cblock[i+1].cause |= C_H2; - cblock[i+1].less |= C_H2; - } + cblock[i+1].score = 0.5; + Debug(3, "H2 Added cblock %i because after show, short and before strict commercial.\n", i+1); + cblock[i+1].cause |= C_H2; + cblock[i+1].less |= C_H2; } + } - for (i = 0; i < block_count-2; i++) + for (i = 0; i < block_count-2; i++) + { + if ( (cblock[i].cause & (C_b | C_u | C_r)) && (cblock[i+1].cause & C_a) && + cblock[i+1].score > 1.0 && cblock[i+1].length < 4.8 && + cblock[i+2].score < 1.0 && cblock[i+2].length > min_show_segment_length + ) { - if ( (cblock[i].cause & (C_b | C_u | C_r)) && (cblock[i+1].cause & C_a) && - cblock[i+1].score > 1.0 && cblock[i+1].length < 4.8 && - cblock[i+2].score < 1.0 && cblock[i+2].length > min_show_segment_length - ) - { - cblock[i+1].score = 0.5; - Debug(3, "H2 Added cblock %i because short and based on aspect ratio change after commercial.\n", i+1); - cblock[i+1].cause |= C_H2; - cblock[i+1].less |= C_H2; - } + cblock[i+1].score = 0.5; + Debug(3, "H2 Added cblock %i because short and based on aspect ratio change after commercial.\n", i+1); + cblock[i+1].cause |= C_H2; + cblock[i+1].less |= C_H2; } - for (i = 0; i < block_count-2; i++) + } + for (i = 0; i < block_count-2; i++) + { + if ( (cblock[i+1].cause & (C_b | C_u | C_r)) && (cblock[i].cause & C_a) && + cblock[i+1].score > 1.0 && cblock[i+1].length < 4.8 && + cblock[i].score < 1.0 && cblock[i].length > min_show_segment_length + ) { - if ( (cblock[i+1].cause & (C_b | C_u | C_r)) && (cblock[i].cause & C_a) && - cblock[i+1].score > 1.0 && cblock[i+1].length < 4.8 && - cblock[i].score < 1.0 && cblock[i].length > min_show_segment_length - ) - { - cblock[i+1].score = 0.5; - Debug(3, "H2 Added cblock %i because short and based on aspect ratio change before commercial.\n", i+1); - cblock[i+1].cause |= C_H2; - cblock[i+1].less |= C_H2; - } + cblock[i+1].score = 0.5; + Debug(3, "H2 Added cblock %i because short and based on aspect ratio change before commercial.\n", i+1); + cblock[i+1].cause |= C_H2; + cblock[i+1].less |= C_H2; } - } - if (!(disable_heuristics & (1 << (1 - 1)))) +} + +if (!(disable_heuristics & (1 << (1 - 1)))) +{ + for (i = 0; i < block_count-1; i++) { - for (i = 0; i < block_count-1; i++) + if (cblock[i].score > 1.4 && cblock[i+1].score <= 1.05 && cblock[i+1].score > 0.0) { - if (cblock[i].score > 1.4 && cblock[i+1].score <= 1.05 && cblock[i+1].score > 0.0) + combined_length = 0; + wscore = 0; + lscore = 0; + j = i+1; + while (j < block_count && combined_length < min_show_segment_length && cblock[j].score <= 1.05 && cblock[j].score > 0.0) { - combined_length = 0; - wscore = 0; - lscore = 0; - j = i+1; - while (j < block_count && combined_length < min_show_segment_length && cblock[j].score <= 1.05 && cblock[j].score > 0.0) + combined_length += cblock[j].length; + wscore += cblock[j].length * cblock[j].score; + lscore += cblock[j].length * cblock[j].logo; + j++; + } + wscore /= combined_length; + lscore /= combined_length; + if (//lscore < 0.36 && + ((combined_length < min_show_segment_length / 2.0 && wscore > 0.9) || + (combined_length < min_show_segment_length / 3.0 && wscore > 0.3) ) && + cblock[j].score > 1.4 && + (combined_length < min_show_segment_length / 6 || + (cblock[i].f_start > after_start && + cblock[j].f_end < before_end))) + { + for (k = i+1; k < j; k++) { - combined_length += cblock[j].length; - wscore += cblock[j].length * cblock[j].score; - lscore += cblock[j].length * cblock[j].logo; - j++; - } - wscore /= combined_length; - lscore /= combined_length; - if (//lscore < 0.36 && - ((combined_length < min_show_segment_length / 2.0 && wscore > 0.9) || - (combined_length < min_show_segment_length / 3.0 && wscore > 0.3) ) && - cblock[j].score > 1.4 && - (combined_length < min_show_segment_length / 6 || - (cblock[i].f_start > after_start && - cblock[j].f_end < before_end))) - { - for (k = i+1; k < j; k++) - { - cblock[k].score = 99.99; - Debug(3, "H1 Discarding cblock %i because too short and between two strong commercial blocks.\n", - k); - cblock[k].cause |= C_H1; - cblock[k].more |= C_H1; - } - + cblock[k].score = 99.99; + Debug(3, "H1 Discarding cblock %i because too short and between two strong commercial blocks.\n", + k); + cblock[k].cause |= C_H1; + cblock[k].more |= C_H1; } } + } - for (i = 0; i < block_count-1; i++) + } + for (i = 0; i < block_count-1; i++) + { + if (cblock[i].score > 1.1 && cblock[i+1].score <= 1.05 && cblock[i+1].score > 0.0) { - if (cblock[i].score > 1.1 && cblock[i+1].score <= 1.05 && cblock[i+1].score > 0.0) + combined_length = 0.0; + wscore = 0; + lscore = 0; + j = i+1; + while (j < block_count && combined_length < min_show_segment_length && cblock[j].score <= 1.05 && cblock[j].score > 0.0) { - combined_length = 0.0; - wscore = 0; - lscore = 0; - j = i+1; - while (j < block_count && combined_length < min_show_segment_length && cblock[j].score <= 1.05 && cblock[j].score > 0.0) + combined_length += cblock[j].length; + wscore += cblock[j].length * cblock[j].score; + lscore += cblock[j].length * cblock[j].logo; + j++; + } + wscore /= combined_length; + lscore /= combined_length; + if (//lscore < 0.36 && + ((combined_length < min_show_segment_length / 4.0 && wscore > 0.9) || + (combined_length < min_show_segment_length / 6 && wscore > 0.3) ) && + cblock[j].score > 1.1 && + (combined_length < min_show_segment_length / 12 || + (cblock[i].f_start > after_start && + cblock[j].f_end < before_end))) + { + for (k = i+1; k < j; k++) { - combined_length += cblock[j].length; - wscore += cblock[j].length * cblock[j].score; - lscore += cblock[j].length * cblock[j].logo; - j++; - } - wscore /= combined_length; - lscore /= combined_length; - if (//lscore < 0.36 && - ((combined_length < min_show_segment_length / 4.0 && wscore > 0.9) || - (combined_length < min_show_segment_length / 6 && wscore > 0.3) ) && - cblock[j].score > 1.1 && - (combined_length < min_show_segment_length / 12 || - (cblock[i].f_start > after_start && - cblock[j].f_end < before_end))) - { - for (k = i+1; k < j; k++) - { - cblock[k].score = 99.99; - Debug(3, "H1 Discarding cblock %i because too short and between two weak commercial blocks.\n", - k); - cblock[k].cause |= C_H1; - cblock[k].more |= C_H1; - } - + cblock[k].score = 99.99; + Debug(3, "H1 Discarding cblock %i because too short and between two weak commercial blocks.\n", + k); + cblock[k].cause |= C_H1; + cblock[k].more |= C_H1; } } - } + } } +} - /* - for (i = 0; i < block_count-2; i++) { - if (cblock[i].score < 0.9 && cblock[i+1].score == 1.0 && cblock[i+1].length < min_show_segment_length/2 && cblock[i+2].score > 1.5) { - cblock[i+1].score *= 1.5; - Debug(3, "Discarding cblock %i because short and on edge between commercial and show.\n", - i+1); - } - if (cblock[i].score > 1.5 && cblock[i+1].score == 1.0 && cblock[i+1].length < min_show_segment_length/2 && cblock[i+2].score < 0.9) { - cblock[i+1].score *= 1.5; - Debug(3, "Discarding cblock %i because short and on edge between commercial and show.\n", - i+1); - } - } - */ - - /* - if (delete_show_before_or_after_current && logoPercentage == 0) { - i = 0; - while (i < block_count-1 && cblock[i].score < 1.0 && cblock[i].f_end < before_end) { - j = i+1; - cl = 0.0; - while (cblock[j].score > 1.05 && cl + cblock[j].length < min_commercialbreak && j < block_count-1) { - cl += cblock[j].length; - j++; - } - if (cblock[j].score < 1.0) { - cblock[i].score = 99.99; - Debug(3, "Discarding cblock %i because separated from cblock %i with small non show gap.\n", - i, j); - cblock[i].cause |= C_H2; - cblock[i].more |= C_H2; - start_deleted = true; - break; - } - i++; - } - if (! start_deleted) { - j = 0; - i = 0; - if (cblock[j].score < 1.0) { - cblock[i].score = 99.99; - Debug(3, "Discarding cblock %i because of being first block.\n", - i, j); - cblock[i].cause |= C_H2; - cblock[i].more |= C_H2; - start_deleted = true; - } - } - i = block_count-1; - while (i > 0 && cblock[i].score < 1.05 && cblock[i].f_start > before_end) { - j = i-1; - cl = 0; - while (cblock[j].score > 1.05 && cl + cblock[j].length < min_commercialbreak && j >0) { - cl += cblock[j].length; - j--; - } - if (cblock[j].score < 1.0) { - cblock[i].score = 99.99; - Debug(3, "Discarding cblock %i because seprated from cblock %i with small non show gap.\n", - i, j); - cblock[i].cause |= C_H2; - cblock[i].more |= C_H2; - end_deleted = true; - break; - } - i++; - } - - if (! end_deleted) { - i = block_count-1; - j = block_count-1; - if (cblock[j].score < 1.05) { - cblock[i].score = 99.99; - Debug(3, "Discarding cblock %i because being last block.\n", - i, j); - cblock[i].cause |= C_H2; - cblock[i].more |= C_H2; - end_deleted = true; - } - } - } - */ - if (delete_show_before_or_after_current && logo_block_count >= 80) - Debug(10, "Too many logo blocks, disabling the delete_show_before_or_after_current processing\n"); - if (delete_show_before_or_after_current && - (commDetectMethod & LOGO) && connect_blocks_with_logo && - !reverseLogoLogic && logoPercentage > logo_fraction - 0.05 && logo_block_count < 40) +if (delete_show_before_or_after_current && logo_block_count >= 80) + Debug(10, "Too many logo blocks, disabling the delete_show_before_or_after_current processing\n"); +if (delete_show_before_or_after_current && + (commDetectMethod & LOGO) && connect_blocks_with_logo && + !reverseLogoLogic && logoPercentage > logo_fraction - 0.05 && logo_block_count < 40) +{ + if (!(disable_heuristics & (1 << (7 - 1)))) { - /* - for (i = 0; i < block_count-1; i++) { - if (cblock[i].score < 1.0 && cblock[i].logo > 0.2 && cblock[i+1].score < 1.0 && cblock[i+1].logo > 0.2 ) { - if (cblock[i].f_end < after_start) { - cblock[i].score = 99.99; - Debug(3, "Discarding cblock %i because cblock %i has also logo.\n", - i, i+1); - } else if (cblock[i+1].f_start > before_end) { - cblock[i+1].score = 99.99; - Debug(3, "Discarding cblock %i because cblock %i has also logo.\n", - i+1, i); - } - } - } - */ - if (!(disable_heuristics & (1 << (7 - 1)))) + i = 0; + while (i < block_count-1 && cblock[i].score < 1.05 && + ((delete_show_before_or_after_current == 1 && cblock[i].f_end < after_start) || + (delete_show_before_or_after_current > 1 && delete_show_before_or_after_current > cblock[i].length))) { - i = 0; - while (i < block_count-1 && cblock[i].score < 1.05 && - ((delete_show_before_or_after_current == 1 && cblock[i].f_end < after_start) || - (delete_show_before_or_after_current > 1 && delete_show_before_or_after_current > cblock[i].length))) + j = i+1; + cl = 0; + combined_length = 0; + while (cblock[j].score > 1.05 && cl + cblock[j].length < min_commercialbreak && j < block_count-1) { - j = i+1; - cl = 0; - combined_length = 0; - while (cblock[j].score > 1.05 && cl + cblock[j].length < min_commercialbreak && j < block_count-1) - { - combined_length += cblock[j].length; - cl += cblock[j].length; - j++; - } - if (cblock[j].score < 1.0 && cblock[j].length > min_show_segment_length/2 ) - { - cblock[i].score = 99.99; - Debug(3, "H7 Discarding cblock %i of %i seconds because cblock %i has also logo and small non show gap.\n", - i, (int)cblock[i].length, j); - cblock[i].cause |= C_H7; - cblock[i].more |= C_H7; - start_deleted = true; - break; - } - i++; + combined_length += cblock[j].length; + cl += cblock[j].length; + j++; } - - i = block_count-1; - while (i > 0 && cblock[i].score < 1.0 && - ((delete_show_before_or_after_current == 1 && cblock[i].f_start > before_end) || - (delete_show_before_or_after_current > 1 && delete_show_before_or_after_current > cblock[i].length))) + if (cblock[j].score < 1.0 && cblock[j].length > min_show_segment_length/2 ) { - j = i-1; - cl = 0; - combined_length = 0; - while (cblock[j].score > 1.05 && cl + cblock[j].length < min_commercialbreak && j >0) - { - combined_length += cblock[j].length; - cl += cblock[j].length; - j--; - } - if (cblock[j].score < 1.0) - { - cblock[i].score = 99.99; - Debug(3, "H7 Discarding cblock %i of %i seconds because cblock %i has also logo and small non show gap.\n", - i, (int)cblock[i].length, j); - cblock[i].cause |= C_H7; - cblock[i].more |= C_H7; - end_deleted = true; - break; - } - i++; + cblock[i].score = 99.99; + Debug(3, "H7 Discarding cblock %i of %i seconds because cblock %i has also logo and small non show gap.\n", + i, (int)cblock[i].length, j); + cblock[i].cause |= C_H7; + cblock[i].more |= C_H7; + start_deleted = true; + break; } + i++; } - /* - for (i = 0; i < block_count-1; i++) { - if (cblock[i].score < 1.0 - - // && cblock[i+1].score > 1.05 && cblock[i+1].length < 10 && cblock[i+2].score < 1.0 && cblock[i+2].logo > 0.2 - ) { - j = i+1; - cl = 0; - while (cblock[j].score > 1.05 && cl + cblock[j].length < min_commercialbreak && j < block_count-1) { - cl += cblock[j].length; - j++; - } - if (cblock[j].score < 1.0) { - if (cblock[j].f_start < after_start) { - cblock[i].score = 99.99; - Debug(3, "Discarding cblock %i because cblock %i has also logo and small non logo gap.\n", - i, j); - } else if (cblock[i].f_end > before_end) { - cblock[j].score = 99.99; - Debug(3, "Discarding cblock %i because cblock %i has also logo and small non logo gap.\n", - j, i); - } - } - } - } - */ - if (!(disable_heuristics & (1 << (3 - 1)))) + + i = block_count-1; + while (i > 0 && cblock[i].score < 1.0 && + ((delete_show_before_or_after_current == 1 && cblock[i].f_start > before_end) || + (delete_show_before_or_after_current > 1 && delete_show_before_or_after_current > cblock[i].length))) { - for (i = 0; i < block_count-1; i++) + j = i-1; + cl = 0; + combined_length = 0; + while (cblock[j].score > 1.05 && cl + cblock[j].length < min_commercialbreak && j >0) { - if (cblock[i].score < 1.0 && cblock[i].logo < 0.1 && cblock[i].length > min_show_segment_length ) - { - if (cblock[i].f_end < after_start) - { - cblock[i].score *= 1.3; - Debug(3, "H3 Demoting cblock %i because cblock %i has no logo and others do.\n", - i, i); - cblock[i].cause |= C_H3; - cblock[i].more |= C_H3; - - } - else if (cblock[i].f_start > before_end) - { - cblock[i].score *= 1.3; - Debug(3, "Demoting cblock %i because cblock %i has no logo and others do.\n", - i, i); - cblock[i].cause |= C_H3; - cblock[i].more |= C_H3; - - } - } + combined_length += cblock[j].length; + cl += cblock[j].length; + j--; } - + if (cblock[j].score < 1.0) + { + cblock[i].score = 99.99; + Debug(3, "H7 Discarding cblock %i of %i seconds because cblock %i has also logo and small non show gap.\n", + i, (int)cblock[i].length, j); + cblock[i].cause |= C_H7; + cblock[i].more |= C_H7; + end_deleted = true; + break; + } + i++; } -// if (!(disable_heuristics & (1 << (3 - 1)))) { - for (i = 1; i < block_count-1; i++) + } + + if (!(disable_heuristics & (1 << (3 - 1)))) + { + for (i = 0; i < block_count-1; i++) { - if (logoPercentage > logo_fraction && - cblock[i].score > 1.0 && cblock[i].logo < 0.1 && - cblock[i].length > min_show_segment_length+4 ) + if (cblock[i].score < 1.0 && cblock[i].logo < 0.1 && cblock[i].length > min_show_segment_length ) { - if (cblock[i].f_start > after_start && - cblock[i].f_end < before_end && - (cblock[i-1].score < 1.0 || cblock[i+1].score < 1.0 )) + if (cblock[i].f_end < after_start) { - cblock[i].score *= 0.5; - Debug(3, "Promoting cblock %i because cblock %i has no logo but long and in the middle of a show.\n", + cblock[i].score *= 1.3; + Debug(3, "H3 Demoting cblock %i because cblock %i has no logo and others do.\n", + i, i); + cblock[i].cause |= C_H3; + cblock[i].more |= C_H3; + + } + else if (cblock[i].f_start > before_end) + { + cblock[i].score *= 1.3; + Debug(3, "Demoting cblock %i because cblock %i has no logo and others do.\n", i, i); cblock[i].cause |= C_H3; cblock[i].more |= C_H3; @@ -5464,115 +4762,78 @@ void WeighBlocks(void) } } -// } } - if (!(disable_heuristics & (1 << (4 - 1)))) + + for (i = 1; i < block_count-1; i++) { + if (logoPercentage > logo_fraction && + cblock[i].score > 1.0 && cblock[i].logo < 0.1 && + cblock[i].length > min_show_segment_length+4 ) + { + if (cblock[i].f_start > after_start && + cblock[i].f_end < before_end && + (cblock[i-1].score < 1.0 || cblock[i+1].score < 1.0 )) + { + cblock[i].score *= 0.5; + Debug(3, "Promoting cblock %i because cblock %i has no logo but long and in the middle of a show.\n", + i, i); + cblock[i].cause |= C_H3; + cblock[i].more |= C_H3; - if ((commDetectMethod & LOGO) && !reverseLogoLogic && logoPercentage > logo_fraction) + } + } + } +} + +if (!(disable_heuristics & (1 << (4 - 1)))) +{ + + if ((commDetectMethod & LOGO) && !reverseLogoLogic && logoPercentage > logo_fraction) + { + i = 1; + while (i < block_count) { - i = 1; - while (i < block_count) + if (cblock[i].score < 1 && cblock[i].b_head > 7 && CUTCAUSE(cblock[i-1].cause) == C_b) { - if (cblock[i].score < 1 && cblock[i].b_head > 7 && CUTCAUSE(cblock[i-1].cause) == C_b) + j = i-1; + k = 0; + while (j >= 0 && k < 5 && cblock[j].b_head > 7 && cblock[j].length < 7 && CUTCAUSE(cblock[j].cause) == C_b) { - j = i-1; - k = 0; - while (j >= 0 && k < 5 && cblock[j].b_head > 7 && cblock[j].length < 7 && CUTCAUSE(cblock[j].cause) == C_b) - { - cblock[j].score *= 0.1; // Add blocks with long black periods before show - Debug(3, "H4 Added cblock %i because of large black gap with cblock %i\n", j, i); - k++; - cblock[j].cause |= C_H4; - cblock[j].less |= C_H4; - j--; - } + cblock[j].score *= 0.1; // Add blocks with long black periods before show + Debug(3, "H4 Added cblock %i because of large black gap with cblock %i\n", j, i); + k++; + cblock[j].cause |= C_H4; + cblock[j].less |= C_H4; + j--; } - i++; } + i++; } - if ((commDetectMethod & LOGO) && !reverseLogoLogic && logoPercentage > logo_fraction) + } + if ((commDetectMethod & LOGO) && !reverseLogoLogic && logoPercentage > logo_fraction) + { + i = 0; + while (i < block_count) { - i = 0; - while (i < block_count) + if (cblock[i].score < 1 && cblock[i].b_tail > 7 && CUTCAUSE(cblock[i].cause) == C_b) { - if (cblock[i].score < 1 && cblock[i].b_tail > 7 && CUTCAUSE(cblock[i].cause) == C_b) + j = i+1; + k = 0; + while (j < block_count && k < 5 && cblock[j].b_tail > 7 && cblock[j].length < 7 && CUTCAUSE(cblock[j-1].cause) == C_b) { - j = i+1; - k = 0; - while (j < block_count && k < 5 && cblock[j].b_tail > 7 && cblock[j].length < 7 && CUTCAUSE(cblock[j-1].cause) == C_b) - { - cblock[j].score *= 0.1; // Add blocks with long black periods before show - Debug(3, "H4 Added cblock %i because of large black gap with cblock %i\n", j, i); - k++; - cblock[j].cause |= C_H4; - cblock[j].less |= C_H4; - j++; - } + cblock[j].score *= 0.1; // Add blocks with long black periods before show + Debug(3, "H4 Added cblock %i because of large black gap with cblock %i\n", j, i); + k++; + cblock[j].cause |= C_H4; + cblock[j].less |= C_H4; + j++; } - i++; } + i++; } } - if (!(disable_heuristics & (1 << (2 - 1)))) - { - /* i = 0; - cl = 0; - while (cblock[i].score < 1.05 && cl + cblock[i].length < min_commercialbreak && i < block_count-1) { - k += cblock[i].length; - i++; - } - if (i < block_count-1 && cblock[i].score > 1.05 && cl < min_commercialbreak) { - for (j = 0; j < i; j++) { - cblock[j].score = 99.99; - Debug(3, "H2 Discarding cblock %i because too short and before commercial.\n", - j); - cblock[j].cause |= C_H2; - cblock[j].more |= C_H2; - } - } - */ - } - /* - - if (!(disable_heuristics & (1 << (1 - 1)))) { - - for (i = 0; i < block_count-2; i++) { - if (cblock[i].score < 1.05 && cblock[i+1].score > 1.05 && cblock[i+2].score < 1.05 && - cblock[i+1].length > min_show_segment_length && logoPercentage < 0.7) { - j = i + 2; - for (k = i+1; k < j; k++) { - cblock[k].score = 0.05; - Debug(3, "H1 Included cblock %i because too long and between two show blocks.\n", - k); - cblock[k].cause |= C_H1; - cblock[k].more |= C_H1; - } - - } - } - } - */ -} -/* - for (i = 0; i < block_count-2; i++) { - if (cblock[i].score < 0.9 && cblock[i+1].score > 1.0 && cblock[i+2].score > 1.5 && - !(cblock[i].cause & (C_b | C_u | C_v | C_a)) ) { - cblock[i+1].score = 0.5; - Debug(3, "Eroded cblock %i because vague cut reason and on edge between commercial and show.\n", - i+1); - } - if (cblock[i].score > 1.5 && cblock[i+1].score > 1.0 && cblock[i+2].score < 0.9 && - !(cblock[i+1].cause & (C_b | C_u | C_v | C_a)) ) { - cblock[i+1].score = 0.5; - Debug(3, "Eroded cblock %i because vague cut reason and on edge between commercial and show.\n", - i+1); - } - } -*/ - - - +} +} #ifndef _WIN32 #include @@ -5589,7 +4850,6 @@ char *_strupr(char *string) } #endif - void OpenOutputFiles() { char tempstr[MAX_PATH]; @@ -5641,7 +4901,7 @@ void OpenOutputFiles() else { output_zoomplayer_cutlist = true; -// fclose(zoomplayer_cutlist_file); + // fclose(zoomplayer_cutlist_file); } } if (output_plist_cutlist) @@ -5657,7 +4917,6 @@ void OpenOutputFiles() { output_plist_cutlist = true; fprintf(plist_cutlist_file, "\n"); -// fclose(plist_cutlist_file); } } @@ -5689,7 +4948,6 @@ void OpenOutputFiles() else { output_zoomplayer_chapter = true; -// fclose(zoomplayer_chapter_file); } } @@ -5774,14 +5032,14 @@ void OpenOutputFiles() if (output_videoredo) { -//2 -//G:\comskip79_46\mpg\MXC_20060518_00000030.mpg -//4255584667:5666994667 -//8590582000:11001991000 -//797115333 -//1083729555 -//4254502333 -//4708947222 + //2 + //G:\comskip79_46\mpg\MXC_20060518_00000030.mpg + //4255584667:5666994667 + //8590582000:11001991000 + //797115333 + //1083729555 + //4254502333 + //4708947222 sprintf(filename, "%s.VPrj", outbasename); videoredo_file = myfopen(filename, "w"); @@ -5801,7 +5059,6 @@ void OpenOutputFiles() fprintf(videoredo_file, "4\n"); } -// fclose(videoredo_file); output_videoredo = true; } else @@ -5813,23 +5070,23 @@ void OpenOutputFiles() if (output_videoredo3) { /* - - D:\My TiVo Recordings\MultipleAudioSample-CDN-96603-234.wtv - - - 0 - 33600111 - 0 - 2931356 - - - 54000113 - 206400112 - 4652532 - 17301504 - - - VideoReDo + + D:\My TiVo Recordings\MultipleAudioSample-CDN-96603-234.wtv + + + 0 + 33600111 + 0 + 2931356 + + + 54000113 + 206400112 + 4652532 + 17301504 + + + VideoReDo */ @@ -5846,11 +5103,6 @@ void OpenOutputFiles() _getcwd(cwd, 256); fprintf(videoredo3_file, "\n%s\\%s\n", cwd, mpegfilename); } -// if (is_h264) { - // fprintf(videoredo3_file, "4\n"); - // } - -// fclose(videoredo3_file); output_videoredo3 = true; } else @@ -5867,7 +5119,6 @@ void OpenOutputFiles() if (btv_file) { fprintf(btv_file, "\n"); -// fclose(btv_file); output_btv = true; } else @@ -5896,7 +5147,6 @@ void OpenOutputFiles() fprintf(cuttermaran_file, "\n"); fprintf(cuttermaran_file, "\n",basename); fprintf(cuttermaran_file, "\n",basename); -// fclose(cuttermaran_file); } else { @@ -5921,7 +5171,6 @@ void OpenOutputFiles() sprintf(tempstr, "%s\\%s", cwd, basename); } fprintf(vcf_file, "VirtualDub.video.SetMode(0);\nVirtualDub.subset.Clear();\n"); -// fclose(vcf_file); } else { @@ -5945,8 +5194,6 @@ void OpenOutputFiles() _getcwd(cwd, 256); sprintf(tempstr, "%s\\%s", cwd, basename); } -// fprintf(vdr_file, "VirtualDub.video.SetMode(0);\nVirtualDub.subset.Clear();\n"); -// fclose(vdr_file); } else { @@ -5995,7 +5242,6 @@ void OpenOutputFiles() womble_file = myfopen(filename, "w"); if (womble_file) { -// fclose(womble_file); output_womble = true; } else @@ -6011,13 +5257,12 @@ void OpenOutputFiles() mls_file = myfopen(filename, "w"); if (mls_file) { -// fclose(mls_file); output_mls = true; -//[BookmarkList] -//PathName= C:\VidTst\Will - Grace - Secrets - Lays.mpg -//VideoStreamID= 224 -//Format= frame -//Count= 19 + //[BookmarkList] + //PathName= C:\VidTst\Will - Grace - Secrets - Lays.mpg + //VideoStreamID= 224 + //Format= frame + //Count= 19 } else @@ -6033,7 +5278,6 @@ void OpenOutputFiles() mpgtx_file = myfopen(filename, "w"); if (mpgtx_file) { -// fclose(mpgtx_file); output_mpgtx = true; fprintf(mpgtx_file, "mpgtx.exe -j -f -o \"%s%s\" \"%s\" ", mpegfilename, ".clean", mpegfilename); } @@ -6050,7 +5294,6 @@ void OpenOutputFiles() dvrcut_file = myfopen(filename, "w"); if (dvrcut_file) { -// fclose(dvrcut_file); if (dvrcut_options[0] == 0) fprintf(dvrcut_file, "dvrcut \"%%1\" \"%%2\" "); else @@ -6069,7 +5312,6 @@ void OpenOutputFiles() dvrmstb_file = myfopen(filename, "w"); if (dvrmstb_file) { -// fclose(dvrmstb_file); fprintf(dvrmstb_file, "\n\n"); } else @@ -6085,9 +5327,8 @@ void OpenOutputFiles() mpeg2schnitt_file = myfopen(filename, "w"); if (mpeg2schnitt_file) { -// fclose(mpeg2schnitt_file); output_mpgtx = true; -// Mpeg2Schnitt.exe %1.m2v /R29.97 /o250 /i550 /o3210 /i4000 /S /E /Z %2.m2v + // Mpeg2Schnitt.exe %1.m2v /R29.97 /o250 /i550 /o3210 /i4000 /S /E /Z %2.m2v if (mpeg2schnitt_options[0] == 0) fprintf(mpeg2schnitt_file, "mpeg2schnitt.exe /S /E /R%5.2f /Z \"%s\" \"%s\" ", fps, "%2", "%1"); else @@ -6154,7 +5395,6 @@ void OutputCommercialBlock(int i, long prev, long start, long end, bool last) } } } - //CLOSEOUTFILE(out_file); if (zoomplayer_cutlist_file && prev < start && end - start > 2) { @@ -6178,14 +5418,13 @@ void OutputCommercialBlock(int i, long prev, long start, long end, bool last) if (zoomplayer_chapter_file && prev < start && end - start > fps ) { -// fprintf(zoomplayer_chapter_file, "AddChapterBySecond(%.4f,Commercial Segment)\nAddChapterBySecond(%.4f,Show Segment)\n", (start) / fps, (end) / fps); fprintf(zoomplayer_chapter_file, "AddChapterBySecond(%i,Commercial Segment)\nAddChapterBySecond(%i,Show Segment)\n", (int)((start) / fps), (int)((end) / fps)); } CLOSEOUTFILE(zoomplayer_chapter_file); if (vcf_file && prev < start && start - prev > 5 && prev > 0 ) { - fprintf(vcf_file, "VirtualDub.subset.AddRange(%i,%i);\n", prev-1, start - prev); + fprintf(vcf_file, "VirtualDub.subset.AddRange(%ld,%ld);\n", prev-1, start - prev); } CLOSEOUTFILE(vcf_file); @@ -6229,8 +5468,8 @@ void OutputCommercialBlock(int i, long prev, long start, long end, bool last) if (videoredo3_file && prev < start && end - start > 2) { /* - 54000113 206400112 - */ + 54000113 206400112 + */ if (i == 0 && demux_pid) fprintf(videoredo3_file, "%d\n%d%d\n", selected_video_pid, selected_audio_pid, selected_subtitle_pid); s_start = max(start-videoredo_offset-1,0); @@ -6281,7 +5520,6 @@ void OutputCommercialBlock(int i, long prev, long start, long end, bool last) if (ipodchap_file && prev < start /* &&!last */ && end - start > 2) { -// fprintf(ipodchap_file,"CHAPTER01=00:00:00.000\nCHAPTER01NAME=1\n"); fprintf(ipodchap_file, "CHAPTER%.2i=%s\nCHAPTER%.2iNAME=%d\n", i+2,dblSecondsToStrMinutes(((double)end) / fps), i+2, i+2 ); } CLOSEOUTFILE(ipodchap_file); @@ -6315,18 +5553,18 @@ void OutputCommercialBlock(int i, long prev, long start, long end, bool last) if (womble_file) { -// CLIPLIST: #1 show -// CLIP: morse.mpg -// 6 0 9963 + // CLIPLIST: #1 show + // CLIP: morse.mpg + // 6 0 9963 if (!last) { if (start - prev > fps) { fprintf(womble_file, "CLIPLIST: #%i show\nCLIP: %s\n6 %li %li\n", i+1, mpegfilename,prev+1, start-prev); } -// CLIPLIST: #2 commercial -// CLIP: morse.mpg -// 6 9963 5196 + // CLIPLIST: #2 commercial + // CLIP: morse.mpg + // 6 9963 5196 fprintf(womble_file, "CLIPLIST: #%i commercial\nCLIP: %s\n6 %li %li\n", i+1, mpegfilename, start, end - start); } @@ -6343,8 +5581,8 @@ void OutputCommercialBlock(int i, long prev, long start, long end, bool last) if (i == 0) { count = (commercial_count+1)*2+1; -// if (commercial[commercial_count].end_frame < frame_count-2) -// count += 2; + // if (commercial[commercial_count].end_frame < frame_count-2) + // count += 2; if (start < fps) count -= 1; fprintf(mls_file, "[BookmarkList]\nPathName= %s\nVideoStreamID= 0\nFormat= frame\nCount= %d\n", mpegfilename, count); @@ -6482,10 +5720,10 @@ void BuildCommercial() while (i < block_count) { if (cblock[i].score > global_threshold -// && -// ( cblock[i].score >= 100 || -// !((commDetectMethod & LOGO) && cblock[i].logo > 0.5 && F2L(cblock[i].f_end, cblock[i].f_start) > min_show_segment_length) )) - ) + // && + // ( cblock[i].score >= 100 || + // !((commDetectMethod & LOGO) && cblock[i].logo > 0.5 && F2L(cblock[i].f_end, cblock[i].f_start) > min_show_segment_length) )) + ) { commercial_count++; commercial[commercial_count].start_frame = cblock[i].f_start/*+ (cblock[i].bframe_count / 2)*/; @@ -6496,10 +5734,10 @@ void BuildCommercial() cblock[i].iscommercial = true; i++; while (i < block_count && cblock[i].score > global_threshold -// && -// ( cblock[i].score >= 100 || -// !((commDetectMethod & LOGO) && cblock[i].logo > 0.5 && F2L(cblock[i].f_end, cblock[i].f_start) > (min_show_segment_length) )) - ) + // && + // ( cblock[i].score >= 100 || + // !((commDetectMethod & LOGO) && cblock[i].logo > 0.5 && F2L(cblock[i].f_end, cblock[i].f_start) > (min_show_segment_length) )) + ) { commercial[commercial_count].end_frame = cblock[i].f_end/* + (cblock[i + 1].bframe_count / 2)*/; commercial[commercial_count].length = F2L(commercial[commercial_count].end_frame, commercial[commercial_count].start_frame); @@ -6549,11 +5787,7 @@ bool OutputBlocks(void) i = 0; while (i < block_count) { - if (cblock[i].score > threshold -// && -// ( cblock[i].score >= 100 || -// !((commDetectMethod & LOGO) && cblock[i].logo > 0.5 && F2L(cblock[i].f_end, cblock[i].f_start) > (min_show_segment_length) )) - ) + if (cblock[i].score > threshold) { commercial_count++; commercial[commercial_count].start_frame = cblock[i].f_start/*+ (cblock[i].bframe_count / 2)*/; @@ -6563,11 +5797,7 @@ bool OutputBlocks(void) commercial[commercial_count].end_block = i; cblock[i].iscommercial = true; i++; - while (i < block_count && cblock[i].score > threshold -// && -// ( cblock[i].score >= 100 || -// !((commDetectMethod & LOGO) && cblock[i].logo > 0.5 && F2L(cblock[i].f_end, cblock[i].f_start) > (min_show_segment_length) )) - ) + while (i < block_count && cblock[i].score > threshold) { commercial[commercial_count].end_frame = cblock[i].f_end/* + (cblock[i + 1].bframe_count / 2)*/; commercial[commercial_count].length = F2L(commercial[commercial_count].end_frame, commercial[commercial_count].start_frame); @@ -6592,7 +5822,7 @@ bool OutputBlocks(void) { i = commercial[k].end_block + 1; if (i < block_count && cblock[i].length < delete_block_after_commercial && - cblock[i].score < threshold) + cblock[i].score < threshold) { Debug(3, "H5 Deleting cblock %i because it is short and comes after a commercial.\n", i); @@ -6608,8 +5838,8 @@ bool OutputBlocks(void) } if (commercial_count > -1 && - commercial[commercial_count].end_block < block_count - 1 && - F2L(cblock[block_count-1].f_end, cblock[commercial[commercial_count].end_block].f_end) < min_show_segment_length / 2.0 ) + commercial[commercial_count].end_block < block_count - 1 && + F2L(cblock[block_count-1].f_end, cblock[commercial[commercial_count].end_block].f_end) < min_show_segment_length / 2.0 ) { commercial[commercial_count].end_block = block_count-1; commercial[commercial_count].end_frame = cblock[block_count-1].f_end/* + (cblock[i + 1].bframe_count / 2)*/; @@ -6622,8 +5852,8 @@ bool OutputBlocks(void) } if (commercial_count > -1 && - commercial[0].start_block == 1 && - F2T(cblock[0].f_end) < min_commercialbreak) + commercial[0].start_block == 1 && + F2T(cblock[0].f_end) < min_commercialbreak) { commercial[0].start_block = 0; commercial[0].start_frame = cblock[0].f_start/* + (cblock[i + 1].bframe_count / 2)*/; @@ -6649,7 +5879,7 @@ bool OutputBlocks(void) commercial[i].start_frame, commercial[i].end_frame, dblSecondsToStrMinutes(commercial[i].length) - ); + ); } #if 1 @@ -6664,11 +5894,11 @@ bool OutputBlocks(void) for (k = commercial_count; k >= 0; k--) { if ( (F2T(commercial[k].start_frame) > 1.0 || commercial[k].length < 10.2 /* Sage bug fix */ ) - && // Do not delete too short first or last commercial - ((commercial[k].length > max_commercialbreak && k != 0 && k != commercial_count) || - (commercial[k].length < min_commercialbreak)) && - F2L(cblock[block_count-1].f_end, commercial[k].start_frame) > min_commercial_break_at_start_or_end && - F2T(commercial[k].end_frame) > min_commercial_break_at_start_or_end ) + && // Do not delete too short first or last commercial + ((commercial[k].length > max_commercialbreak && k != 0 && k != commercial_count) || + (commercial[k].length < min_commercialbreak)) && + F2L(cblock[block_count-1].f_end, commercial[k].start_frame) > min_commercial_break_at_start_or_end && + F2T(commercial[k].end_frame) > min_commercial_break_at_start_or_end ) { for (i = commercial[k].start_block; i <= commercial[k].end_block; i++) { @@ -6687,7 +5917,7 @@ bool OutputBlocks(void) } } #ifdef NOTDEF -// keep first seconds + // keep first seconds if (always_keep_first_seconds && commercial_count >= 0) { k = 0; @@ -6731,79 +5961,16 @@ bool OutputBlocks(void) } } #endif - - /* - // Delete too short first commercial - k = 0; - if (commercial_count >= 0 && commercial[k].start_frame < fps && - commercial[k].length < min_commercial_break_at_start_or_end) { - for (i = commercial[k].start_block; i <= commercial[k].end_block; i++) { - Debug(3, "H6 Deleting block %i because it is part of a too short commercial at the start of the recording.\n", - i); - cblock[i].score = 0; - cblock[i].cause |= C_H6; - cblock[i].less |= C_H6; - } - for (i = k; i < commercial_count; i++) { - commercial[i] = commercial[i + 1]; - } - commercial_count--; - deleted = true; - } - // Delete too short last commercial - k = commercial_count; - if (commercial_count >= 0 && (cblock[block_count-1].f_end - commercial[k].end_frame) < fps && - commercial[k].length < min_commercial_break_at_start_or_end) { - for (i = commercial[k].start_block; i <= commercial[k].end_block; i++) { - Debug(3, "H6 Deleting block %i because it is part of a too short commercial at the end of the recording.\n", - i); - cblock[i].score = 0; - cblock[i].cause |= C_H6; - cblock[i].less |= C_H6; - } - for (i = k; i < commercial_count; i++) { - commercial[i] = commercial[i + 1]; - } - commercial_count--; - deleted = true; - } - */ - /* - // Delete too short shows - for (k = commercial_count-1; k >= 0; k--) { - if ( commercial[k+1].start_frame - commercial[k].end_frame < min_show_segment_length / 2.5 * fps || - (commercial[k].end_frame > after_start && - commercial[k].end_frame < before_end && - commercial[k+1].start_frame - commercial[k].end_frame < min_show_segment_length * fps) - ) { - for (i = commercial[k].end_block+1; i < commercial[k+1].start_block; i++) { - cblock[i].score = 99.99; - cblock[i].cause |= C_H6; - cblock[i].less |= C_H6; - } - commercial[k].end_block = commercial[k+1].end_block; - commercial[k].end_frame = commercial[k+1].end_frame; - commercial[k].length = (commercial[k].end_frame - commercial[k].start_frame) / fps; - - for (i = k+1; i < commercial_count; i++) { - commercial[i] = commercial[i + 1]; - } - commercial_count--; - deleted = true; - } - } - */ - } + if (delete_show_after_last_commercial && - commercial_count > -1 && - // ( commercial[commercial_count].end_block == block_count - 2 || commercial[commercial_count].end_block == block_count - 3) && - ((delete_show_after_last_commercial == 1 && cblock[commercial[commercial_count].start_block].f_end > before_end) || - (delete_show_after_last_commercial > F2L(cblock[block_count-1].f_end, cblock[commercial[commercial_count].start_block].f_start)) ) + commercial_count > -1 && + ((delete_show_after_last_commercial == 1 && cblock[commercial[commercial_count].start_block].f_end > before_end) || + (delete_show_after_last_commercial > F2L(cblock[block_count-1].f_end, cblock[commercial[commercial_count].start_block].f_start)) ) - && - commercial[commercial_count].end_block < block_count-1 - ) + && + commercial[commercial_count].end_block < block_count-1 + ) { i = commercial[commercial_count].end_block + 1; commercial[commercial_count].end_block = block_count-1; @@ -6820,14 +5987,12 @@ bool OutputBlocks(void) } } - - if (delete_show_before_first_commercial && - commercial_count > -1 && - commercial[0].start_block == 1 && - ((delete_show_before_first_commercial == 1 && cblock[commercial[0].end_block].f_end < after_start) || - (delete_show_before_first_commercial > F2T(cblock[commercial[0].end_block].f_end))) - ) + commercial_count > -1 && + commercial[0].start_block == 1 && + ((delete_show_before_first_commercial == 1 && cblock[commercial[0].end_block].f_end < after_start) || + (delete_show_before_first_commercial > F2T(cblock[commercial[0].end_block].f_end))) + ) { commercial[0].start_block = 0; commercial[0].start_frame = cblock[0].f_start/* + (cblock[i + 1].bframe_count / 2)*/; @@ -6840,7 +6005,7 @@ bool OutputBlocks(void) } -// keep first seconds + // keep first seconds if (always_keep_first_seconds && commercial_count >= 0) { k = 0; @@ -6883,8 +6048,6 @@ bool OutputBlocks(void) } } - - if (deleted) Debug(1, "\n\n\t---------------------\n\tFinal Commercial List\n\t---------------------\n"); else @@ -6902,19 +6065,14 @@ bool OutputBlocks(void) commercial[i].length += -2*padding + remove_before + remove_after; } - - comlength = 0.; for (i = 0; i < commercial_count; i++) { comlength += commercial[i].length; } -// Debug(1, "Total commercial length found: %s\n", dblSecondsToStrMinutes(comlength)); if ((zoomplayer_chapter_file) && -// (commercial[0].length >= min_commercialbreak) && -// (commercial[0].length <= max_commercialbreak) && - (commercial[0].start_frame > 5)) + (commercial[0].start_frame > 5)) { fprintf(zoomplayer_chapter_file, "AddChapter(1,Show Segment)\n"); } @@ -6923,7 +6081,6 @@ bool OutputBlocks(void) prev = -1; for (i = 0; i <= commercial_count; i++) { -// if ((commercial[i].length >= min_commercialbreak) && (commercial[i].length <= max_commercialbreak)) { foundCommercials = true; if (deleted) @@ -6936,7 +6093,7 @@ bool OutputBlocks(void) commercial[i].start_block, commercial[i].end_block, dblSecondsToStrMinutes(commercial[i].length) - ); + ); OutputCommercialBlock(i, prev, commercial[i].start_frame, commercial[i].end_frame, (commercial[i].end_frame < frame_count-2 ? false : true)); prev = commercial[i].end_frame; } @@ -6967,7 +6124,7 @@ bool OutputBlocks(void) { for (i = 0; i < block_count; i++) { -// fprintf(videoredo3_file, "%.0f\n", i, F2T(max(cblock[i].f_end-videoredo_offset-1,0)) * 10000000); + fprintf(videoredo3_file, "%.0f\n", i, F2T(max(cblock[i].f_end-videoredo_offset-1,0)) * 10000000); } fclose(videoredo3_file); } @@ -6975,13 +6132,11 @@ bool OutputBlocks(void) if (output_chapters) { -// sprintf(filename, "%s.chap", outbasename); -// chapters_file = myfopen(filename, "a+"); if (chapters_file) { for (i = 0; i < block_count; i++) { - fprintf(chapters_file, "%d\n", cblock[i].f_end); + fprintf(chapters_file, "%ld\n", cblock[i].f_end); } fclose(chapters_file); } @@ -7040,26 +6195,18 @@ bool OutputBlocks(void) Debug( 1, " # sbf bs be fs fe sc len scr cmb ar cut bri logo vol sil corr stdev cc\n" - ); - -// if (output_training) { -// fprintf(training_file, TRAINING_LAYOUT, -// "0", 0, 0, 0, 0,0,0, 0, 0, 0, 0); -// } - - - + ); for (i = 0; i < block_count; i++) { /* - cs[5] = (cblock[i].cause & 16 ? 'b' : ' '); - cs[4] = (cblock[i].cause & 8 ? 'u' : ' '); - cs[3] = (cblock[i].cause & 32 ? 'a' : ' '); - cs[2] = (cblock[i].cause & 4 ? 's' : ' '); - cs[1] = (cblock[i].cause & 1 ? 'l' : ' '); - cs[0] = (cblock[i].cause & 2 ? 'c' : ' '); - cs[6] = 0; + cs[5] = (cblock[i].cause & 16 ? 'b' : ' '); + cs[4] = (cblock[i].cause & 8 ? 'u' : ' '); + cs[3] = (cblock[i].cause & 32 ? 'a' : ' '); + cs[2] = (cblock[i].cause & 4 ? 's' : ' '); + cs[1] = (cblock[i].cause & 1 ? 'l' : ' '); + cs[0] = (cblock[i].cause & 2 ? 'c' : ' '); + cs[6] = 0; */ Debug( @@ -7075,7 +6222,7 @@ bool OutputBlocks(void) cblock[i].f_end, cblock[i].score, cblock[i].length, -// cblock[i].schange_count, + // cblock[i].schange_count, cblock[i].schange_rate, cblock[i].combined_count, cblock[i].ar_ratio, @@ -7090,14 +6237,10 @@ bool OutputBlocks(void) 0.0 /*cblock[i].correlation */ , cblock[i].stdev, CCTypeToStr(cblock[i].cc_type) - ); + ); if (commDetectMethod & LOGO) { -// if (CheckFramesForLogo(cblock[i].f_start, cblock[i].f_end)) { -// Debug(1, "\tLogo Present\n"); -// } else { Debug(1, "\n"); -// } } else { @@ -7107,40 +6250,24 @@ bool OutputBlocks(void) OutputAspect(); OutputTraining(); - - - -// if (output_training) { -// fprintf(training_file, TRAINING_LAYOUT, -// "0", 0, 0, 100, 0,0,0, 0, 0, 0, 0); -// } - } -// OutputCleanMpg(); -// OutputDebugWindow(false,0); return (foundCommercials); } void OutputStrict(double len, double delta, double tol) { -//return; if (output_training && !training_file) { training_file = myfopen("strict.csv", "a+"); -// fprintf(training_file, "// score, length, fraction, position,combined, ar error, logo, strict \n"); } if (training_file) fprintf(training_file, "%+f,%+f,%+f, %s\n", len,delta, tol, basename); } - - - void OutputTraining() { int i,s,e,r; -// return; if (!output_training) return; training_file = myfopen("comskip.csv", "a+"); @@ -7241,9 +6368,7 @@ void OutputTraining() CauseString(cblock[i].cause), CauseString(cblock[i].less), CauseString(cblock[i].more), - basename, - "a","b"); - + basename); } } #endif @@ -7253,7 +6378,7 @@ void OutputTraining() static unsigned char MPEG2SysHdr[] = {0x00, 0x00, 0x01, 0xBB, 00, 0x12, 0x80, 0x8E, 0xD3, 0x04, 0xE1, 0x7F, 0xB9, 0xE0, 0xE0, 0xB8, 0xC0, 0x54, 0xBD, 0xE0, 0x3A, 0xBF, 0xE0, 0x02}; - bool OutputCleanMpg() +bool OutputCleanMpg() { FILE *infile=0; @@ -7288,40 +6413,6 @@ static unsigned char MPEG2SysHdr[] = {0x00, 0x00, 0x01, 0xBB, 00, 0x12, 0x80, 0x inf = fileno(infile); #endif - /* - if (_lseeki64(Infile[File_Limit-1], process.leftlba*BUFFER_SIZE,SEEK_SET)!= -1L) - { - - j = _read(Infile[File_Limit-1], Buf, BufSize); - if (j>=BUFFER_SIZE) - { - for(i=0; i<(j-4); i++) - { - if(*((UNALIGNED DWORD*)(Buf+i)) == dwPackStart) - { - startpos = (process.leftlba*BUFFER_SIZE) + i; - endpos = process.total; - - if (_lseeki64(Infile[File_Limit-1], process.rightlba*BUFFER_SIZE,SEEK_SET)!= -1L) - { - j = _read(Infile[File_Limit-1], Buf, BufSize); - if (j>=BUFFER_SIZE) - { - for(i=0; i<(j-4); i++) - { - if(*((UNALIGNED DWORD*)(Buf+i)) == dwPackStart) - { - endpos = (process.rightlba*BUFFER_SIZE) + i; - break; - } - } - - } - - } - - */ - startpos = frame[1].goppos; for (c=0; c<=commercial_count; c++) @@ -7340,36 +6431,48 @@ static unsigned char MPEG2SysHdr[] = {0x00, 0x00, 0x01, 0xBB, 00, 0x12, 0x80, 0x while (startposBufSize) len = BufSize;//sizeof(Buf); + if(len>BufSize) len = BufSize; +#ifdef _WIN32 i = _read(inf, Buf, (unsigned int)len); +#else + i = read(inf, Buf, (unsigned int)len); +#endif if(i<=0) { - // MessageBox(hWnd, "Source read error. ", "Oops...", MB_ICONSTOP | MB_OK); return(false); } + j=0; if (firstbl) { firstbl=false; j = 14 + (Buf[13] & 7); - if (*((UNALIGNED DWORD*)(Buf+j)) == 0xBB010000) j=0; //FIXME: unaligned dword may not be the right thing on mac: #defined away - else - { + +#ifdef _WIN32 //FIXME: unaligned dword may not be the right thing on mac: #defined away + if (*((UNALIGNED DWORD*)(Buf+j)) == 0xBB010000) { + j=0; + } else { _write(outf, Buf, j); _write(outf, MPEG2SysHdr, sizeof(MPEG2SysHdr)); } +#else + write(outf, Buf, j); + write(outf, MPEG2SysHdr, sizeof(MPEG2SysHdr)); +#endif } +#ifdef _WIN32 if(_write(outf, Buf+j, i-j)<=0) - { - // MessageBox(hWnd, "Write error. ", "Oops...", MB_ICONSTOP | MB_OK); - return(false); - } +#else + if(write(outf, Buf+j, i-j)<=0) +#endif + { + return(false); + } if (i!=len) { - // MessageBox(hWnd, "Something strange happened. Aborting. ", "Oops...", MB_ICONSTOP | MB_OK); return(false); } startpos +=len; @@ -7378,7 +6481,6 @@ static unsigned char MPEG2SysHdr[] = {0x00, 0x00, 0x01, 0xBB, 00, 0x12, 0x80, 0x if (curperc != prevperc) { - // SendMessage(hBar, PBM_SETPOS, DWORD(curperc),0); prevperc=curperc; } @@ -7386,7 +6488,13 @@ static unsigned char MPEG2SysHdr[] = {0x00, 0x00, 0x01, 0xBB, 00, 0x12, 0x80, 0x startpos = frame[commercial[c].end_frame].goppos; } + +#ifdef _WIN32 _close(outf); +#else + close(outf); +#endif + free(Buf); return(true); } @@ -7438,11 +6546,8 @@ bool IsStandardCommercialLength(double length, double tolerance, bool strict) if (local_tolerance > 1.0) local_tolerance = 1.0; -// length += 0.22; // Correction for standard error length += 0.11; // Correction for standard error -// length -= 0.1; // Correction for standard error - for (i = 0; i < length_count; i++) { if ( standard_length[i] < min_show_segment_length - 3) @@ -7459,10 +6564,11 @@ bool IsStandardCommercialLength(double length, double tolerance, bool strict) double FindNumber(char* str1, char* str2, double v) { - boolean negative=false; - char tmp[255]; - int i; + bool negative=false; + char tmp[255]; + int i; double res = -1; + if (str1 == 0) { return (-1); @@ -7505,11 +6611,12 @@ double FindNumber(char* str1, char* str2, double v) char * FindString(char* str1, char* str2, char *v) { static char foundText[1024]; - char tmp[255]; - char *t; - boolean negative=false; - double res; - int found = 0; + char tmp[255]; + char *t; + bool negative=false; + double res; + int found = 0; + if (str1 == 0) { return (0); @@ -7543,8 +6650,8 @@ char * FindString(char* str1, char* str2, char *v) v = foundText; found = 1; sprintf(tmp, "%s\"%s\"\n", str2, foundText); -// strcat(ini_text, tmp); -// return(foundText); + // strcat(ini_text, tmp); + // return(foundText); } } @@ -7578,7 +6685,7 @@ char * FindString(char* str1, char* str2, char *v) *t++ = '"'; *t++ = '\n'; *t++ = 0; -// sprintf(tmp, "%s\"%s\"\n", str2, v); + // sprintf(tmp, "%s\"%s\"\n", str2, v); AddIniString(tmp); if (found) return(foundText); @@ -7589,7 +6696,7 @@ char * FindString(char* str1, char* str2, char *v) void AddIniString( char *s) { strcat(ini_text, s); -// printf("ini = %d\n", strlen(ini_text)); + // printf("ini = %d\n", strlen(ini_text)); } char* intSecondsToStrMinutes(int seconds) @@ -7619,14 +6726,13 @@ char* dblSecondsToStrMinutes(double seconds) void LoadIniFile() { -// FILE* ini_file = NULL; + // FILE* ini_file = NULL; char data[60000]; char tempstr[MAX_PATH]; char* ts; size_t len = 0; double tmp; ini_text[0] = 0; - // ini_file = myfopen(inifilename, "r"); if (!ini_file) { printf("No INI file found in current directory. Searching PATH...\n"); @@ -7700,7 +6806,7 @@ void LoadIniFile() if ((tmp = FindNumber(data, "lowres=", (double) lowres)) > -1) lowres = (int)tmp; #ifdef DONATORS if ((tmp = FindNumber(data, "skip_b_frames=", (double) skip_B_frames)) > -1) skip_B_frames = (int)tmp; -// if (skip_B_frames != 0 && max_repair_size == 0) max_repair_size = 40; + // if (skip_B_frames != 0 && max_repair_size == 0) max_repair_size = 40; #else #ifdef _DEBUG @@ -7787,23 +6893,11 @@ void LoadIniFile() if ((tmp = FindNumber(data, "cc_correct_type_modifier=", (double) cc_correct_type_modifier)) > -1) cc_correct_type_modifier = (double)tmp; AddIniString("[Live TV]\n"); if ((tmp = FindNumber(data, "live_tv=", (double) live_tv)) > -1) live_tv = (bool) tmp; -/* if ((tmp = FindNumber(data, "standoff_retries=", (double) standoff_retries)) > -1) standoff_retries = (int) tmp; - if ((tmp = FindNumber(data, "standoff_time=", (double) standoff_time)) > -1) standoff_time = (int) tmp; - if ((tmp = FindNumber(data, "standoff_size=", (double) standoff_size)) > -1) standoff_size = (int) tmp * 1000; - if ((tmp = FindNumber(data, "standoff_initial_size=", (double) standoff_initial_size)) > -1) standoff_initial_size = (int) tmp * 1000; - if ((tmp = FindNumber(data, "standoff_initial_wait=", (double) standoff_initial_wait)) > -1) standoff_initial_wait = (int) tmp; -*/ if ((tmp = FindNumber(data, "live_tv_retries=", (double) live_tv_retries)) > -1) live_tv_retries = (int) tmp; -// if ((tmp = FindNumber(data, "dvrms_live_tv_retries=", (double) dvrms_live_tv_retries)) > -1) dvrms_live_tv_retries = (int) tmp; -// if ((tmp = FindNumber(data, "standoff=", (double) standoff)) > -1) standoff = (int) tmp; -// if ((tmp = FindNumber(data, "dvrmsstandoff=", (double) dvrmsstandoff)) > -1) dvrmsstandoff = (int) tmp; -// set_standoff(live_tv_retries, standoff, live_tv); if ((tmp = FindNumber(data, "require_div5=", (double) require_div5)) > -1) require_div5 = (bool) tmp; if ((tmp = FindNumber(data, "div5_tolerance=", (double) div5_tolerance)) > -1) div5_tolerance = tmp; if ((tmp = FindNumber(data, "incommercial_frames=", (double) incommercial_frames)) > -1) incommercial_frames = (int) tmp; - - AddIniString("[Output Control]\n"); if ((tmp = FindNumber(data, "output_default=", (double) output_default)) > -1) output_default = (bool) tmp; if ((tmp = FindNumber(data, "output_chapters=", (double) output_chapters)) > -1) output_chapters = (bool) tmp; @@ -7882,8 +6976,6 @@ void LoadIniFile() { printf("No INI file found anywhere!!!!\n"); } -// if (live_tv) -// output_incommercial = true; if (added_recording > 0 && giveUpOnLogoSearch < added_recording * 60) giveUpOnLogoSearch += added_recording * 60; } @@ -7900,28 +6992,24 @@ FILE* LoadFile(char *f) return( LoadSettings( 2, cmd)); } -#include - -BOOL AnsiToUnicode16(const char *in_Src, WCHAR *out_Dst, INT in_MaxLen) +#ifdef _WIN32 +/** + * Implementation for MS Windows + */ +bool AnsiToUnicode16(const char* in_Src, wchar_t* out_Dst, int in_MaxLen) { /* locals */ - INT lv_Len; + int lv_Len; int i; // do NOT decrease maxlen for the eos if (in_MaxLen <= 0) - return FALSE; + return false; // let windows find out the meaning of ansi // - the SrcLen=-1 triggers MBTWC to add a eos to Dst and fails if MaxLen is too small. // - if SrcLen is specified then no eos is added // - if (SrcLen+1) is specified then the eos IS added lv_Len = MultiByteToWideChar(CP_UTF8, 0, in_Src, -1, out_Dst, in_MaxLen); -/* - for (i = 0; i < strlen(in_Src); i++) - { - fprintf(stderr, "[%i]=%i\n", i, in_Src[i]); - } -*/ // validate if (lv_Len < 0) lv_Len = 0; @@ -7935,22 +7023,27 @@ BOOL AnsiToUnicode16(const char *in_Src, WCHAR *out_Dst, INT in_MaxLen) else if (out_Dst[in_MaxLen-1]) out_Dst[0] = 0; // done - return TRUE; + return true; } +#endif - -FILE *myfopen( const char * f, char * m) +FILE* myfopen( const char * f, char * m) { +#ifdef _WIN32 wchar_t wf[2000], wm[2000]; int n; n= AnsiToUnicode16(f, wf, 2000); n= AnsiToUnicode16(m, wm, 2000); + return(_wfopen(wf,wm)); +#else + return(fopen(f,m)); +#endif } - - +#ifdef _WIN32 +/** WIN32 stat function */ static int mystat( char * f, struct _stati64 * s) { wchar_t wf[2000]; @@ -7958,246 +7051,256 @@ static int mystat( char * f, struct _stati64 * s) n= AnsiToUnicode16(f, wf, 2000); return(_wstati64(wf,s)); } +#else +/** Unix/Unix-like stat function */ +static int mystat( char * f, struct stat * s) +{ + return(stat(f,s)); +} +#endif + static int myremove( char * f) { +#ifdef _WIN32 wchar_t wf[2000]; int n; n= AnsiToUnicode16(f, wf, 2000); return(_wremove(wf)); +#else + return(unlink(f)); +#endif } - - -FILE* LoadSettings(int argc, char ** argv) -{ - char data[20000]; - char tempstr[MAX_PATH]; - char cwd[MAX_PATH]; -// FILE* ini_file = NULL; - FILE* logo_file = NULL; - FILE* log_file = NULL; - FILE* test_file = NULL; - const char *CEW_argv[10]; - size_t len = 0; - double tmp; - int i = 0; -// int play_nice_start = -1; -// int play_nice_end = -1; - time_t ltime; - struct tm* now = NULL; - int mil_time; - struct arg_lit* cl_playnice = arg_lit0("n", "playnice", "Slows detection down"); - struct arg_lit* cl_output_zp_cutlist = arg_lit0(NULL, "zpcut", "Outputs a ZoomPlayer cutlist"); - struct arg_lit* cl_output_zp_chapter = arg_lit0(NULL, "zpchapter", "Outputs a ZoomPlayer chapter file"); - struct arg_lit* cl_output_vredo = arg_lit0(NULL, "videoredo", "Outputs a VideoRedo cutlist"); - struct arg_lit* cl_output_csv = arg_lit0(NULL, "csvout", "Outputs a csv of the frame array"); - struct arg_lit* cl_output_training = arg_lit0(NULL, "quality", "Outputs a csv of false detection segments"); - struct arg_lit* cl_output_plist = arg_lit0(NULL, "plist", "Outputs a mac-style plist for addition to an EyeTV archive as the 'markers' property"); - struct arg_int* cl_detectmethod = arg_intn("d", "detectmethod", NULL, 0, 1, "An integer sum of the detection methods to use"); -// struct arg_int* cl_pid = arg_intn("p", "pid", NULL, 0, 1, "The PID of the video in the TS"); - struct arg_str* cl_pid = arg_strn("p", "pid", NULL, 0, 1, "The PID of the video in the TS"); - struct arg_int* cl_dump = arg_intn("u", "dump", NULL, 0, 1, "Dump the cutscene at this frame number"); - struct arg_lit* cl_ts = arg_lit0("t", "ts", "The input file is a Transport Stream"); - struct arg_lit* cl_help = arg_lit0("h", "help", "Display syntax"); - struct arg_lit* cl_show = arg_lit0("s", "play", "Play the video"); - struct arg_lit* cl_timing = arg_lit0(NULL, "timing", "Dump the timing into a file"); - struct arg_lit* cl_debugwindow = arg_lit0("w", "debugwindow", "Show debug window"); - struct arg_lit* cl_quiet = arg_lit0("q", "quiet", "Not output logging to the console window"); - struct arg_lit* cl_demux = arg_lit0("m", "demux", "Demux the input into elementary streams"); - struct arg_int* cl_verbose = arg_intn("v", "verbose", NULL, 0, 1, "Verbose level"); - struct arg_file* cl_ini = arg_filen(NULL, "ini", NULL, 0, 1, "Ini file to use"); - struct arg_file* cl_logo = arg_filen(NULL, "logo", NULL, 0, 1, "Logo file to use"); - struct arg_file* cl_cut = arg_filen(NULL, "cut", NULL, 0, 1, "CutScene file to use"); - struct arg_file* cl_work = arg_filen(NULL, "output", NULL, 0, 1, "Folder to use for all output files"); - struct arg_int* cl_selftest = arg_intn(NULL, "selftest", NULL, 0, 1, "Execute a selftest"); - struct arg_file* in = arg_filen(NULL, NULL, NULL, 1, 1, "Input file"); - struct arg_file* out = arg_filen(NULL, NULL, NULL, 0, 1, "Output folder for cutlist"); - struct arg_end* end = arg_end(20); - void* argtable[] = - { - cl_help, - cl_debugwindow, - cl_playnice, - cl_output_zp_cutlist, - cl_output_zp_chapter, - cl_output_vredo, - cl_output_csv, - cl_output_training, - cl_output_plist, - cl_demux, - cl_pid, - cl_ts, - cl_detectmethod, - cl_verbose, - cl_dump, - cl_show, - cl_timing, - cl_quiet, - cl_ini, - cl_logo, - cl_cut, - cl_work, - cl_selftest, - in, - out, - end +void usage() +{ + printf("Usage:\n comskip [-h|--help] [-w|--debugwindow] [-n|--playnice] [--zpcut] [--zpchapter] [--videoredo] [--csvout] [-p|--pid=] [-t|--ts] [-d|--detectmethod=] [-v|--verbose=] [--ini=] [--logo=] \n"); + + printf(" -h, --help Display syntax\n"); + printf(" -w, --debugwindow Show debug window\n"); + printf(" -n, --playnice Slows detection down\n"); + printf(" --zpcut Outputs a ZoomPlayer cutlist\n"); + printf(" --zpchapter Outputs a ZoomPlayer chapter file\n"); + printf(" --videoredo Outputs a VideoRedo cutlist\n"); + printf(" --csvout Outputs a csv of the frame array\n"); + printf(" -p, --pid= The PID of the video in the TS\n"); + printf(" -t, --ts The input file is a Transport Stream\n"); + printf(" -d, --detectmethod= An integer sum of the detection methods to use\n"); + printf(" -v, --verbose= Verbose level\n"); + printf(" -m, --demux Demux the input file into Elementary Streams\n"); + printf(" --ini= Ini file to use\n"); + printf(" --logo= Logo file to use\n"); + printf(" Input file\n"); + printf("\nDetection methods available:\n"); + printf("\t%3i - Black Frame\n", BLACK_FRAME); + printf("\t%3i - Logo\n", LOGO); + printf("\t%3i - Scene Change\n", SCENE_CHANGE); + printf("\t%3i - Resolution Change\n", RESOLUTION_CHANGE); + printf("\t%3i - Closed Captions\n", CC); + printf("\t%3i - Aspect Ratio\n", AR); + printf("\t%3i - Silence\n", SILENCE); + printf("\t%3i - CutScenes\n", CUTSCENE); + printf("\t255 - USE ALL AVAILABLE\n"); + exit(2); +} + +FILE* LoadSettings(int argc, char** argv) +{ + FILE* test_file = NULL; + enum { + OPT_ZPCUT, + OPT_ZPCHAPTER, + OPT_VIDEOREDO, + OPT_CVSOUT, + OPT_QUALITY, + OPT_PLIST, + OPT_TIMING, + OPT_INI, + OPT_LOGO, + OPT_CUT, + OPT_OUTPUT, + OPT_SELFTEST, + }OPT_TYPE; + char ch; + int i; + time_t ltime; + struct tm* now = NULL; + int mil_time; + FILE* logo_file = NULL; + FILE* log_file = NULL; + char* CEW_argv[10]; + struct { + bool playnice; + bool zpcut; + bool zpchapter; + bool videoredo; + bool csvout; + bool quality; + bool plist; + int detectmethod; + char* pid; + int dump; + bool ts; + bool help; + bool play; + bool timing; + bool debugwindow; + bool quiet; + bool demux; + bool verbose; + char* ini; + char* logo; + char* cut; + char* output; + int selftest; + char* infile; + char* outdir; + } config; + struct option longopts[] = { + {"playnice", no_argument, NULL, 'n'}, + {"zpcut", no_argument, &config.zpcut, true}, + {"zpchapter", no_argument, &config.zpchapter, true}, + {"videoredo", no_argument, &config.videoredo, true}, + {"csvout", no_argument, &config.csvout, true}, + {"quality", no_argument, &config.quality, true}, + {"plist", no_argument, &config.plist, true}, + {"detectmethod", required_argument, NULL, 'd'}, + {"pid", required_argument, NULL, 'p'}, + {"dump", required_argument, NULL, 'u'}, + {"ts", no_argument, NULL, 't'}, + {"help", no_argument, NULL, 'h'}, + {"play", no_argument, NULL, 's'}, + {"timing", no_argument, &config.timing, true}, + {"debugwindow", no_argument, NULL, 'w'}, + {"quiet", no_argument, NULL, 'q'}, + {"demux", no_argument, NULL, 'm'}, + {"verbose", required_argument, NULL, 'v'}, + {"ini", required_argument, NULL, OPT_INI}, + {"logo", required_argument, NULL, OPT_LOGO}, + {"cut", required_argument, NULL, OPT_CUT}, + {"output", required_argument, NULL, OPT_OUTPUT}, + {"selftest", required_argument, NULL, OPT_SELFTEST}, + {0, 0, 0, 0} }; - int nerrors; - int exitcode = 0; - incomingCommandLine[0]=0; // was: sprintf(incomingCommandLine, ""); - if (strchr(argv[0], ' ')) - { - sprintf(incomingCommandLine, "\"%s\"", argv[0]); - } - else - { - sprintf(incomingCommandLine, "%s", argv[0]); - } - for (i = 1; i < argc; i++) - { - sprintf(tempstr, "%s", incomingCommandLine); - if (strchr(argv[i], ' ')) - { - sprintf(incomingCommandLine, "%s \"%s\"", tempstr, argv[i]); - } - else - { - sprintf(incomingCommandLine, "%s %s", tempstr, argv[i]); - } - } + memset(&config, 0, sizeof(config)); - printf("The commandline used was:\n%s\n\n", incomingCommandLine); - argument = malloc(sizeof(char *) * argc); - argument_count = argc; - for (i = 0; i < argc; i++) + // start opt analyze + while ((ch = getopt_long(argc, argv, "nd:p:u:thswqmv:", longopts, NULL)) != -1) { - argument[i] = malloc(sizeof(char) * (strlen(argv[i]) + 1)); - strcpy(argument[i], argv[i]); + switch (ch){ + case 'n': + config.playnice = true; + break; + case 'd': + config.detectmethod = atoi(optarg); + break; + case 'p': + config.pid = optarg; + break; + case 'u': + config.dump = atoi(optarg); + break; + case 't': + config.ts = true; + break; + case 's': + config.play = true; + break; + case 'w': + config.debugwindow = true; + break; + case 'q': + config.quiet = true; + break; + case 'm': + config.demux = true; + break; + case 'v': + config.verbose = atoi(optarg); + break; + case OPT_INI: + config.ini = optarg; + break; + case OPT_LOGO: + config.logo = optarg; + break; + case OPT_CUT: + config.cut = optarg; + break; + case OPT_OUTPUT: + config.output = optarg; + break; + case OPT_SELFTEST: + config.selftest = atoi(optarg); + break; + case 'h': + case ':': + case '?': + usage(); + exit(2); + break; + }; } - if (argc <= 1) + if (optind < argc) { - -#ifdef COMSKIPGUI -// output_debugwindow = true; -#endif - - if (strstr(argv[0],"GUI")) - output_debugwindow = true; - if (output_debugwindow) - { -// This is a trick to ask for a input filename when no argument has been given. -// while (mpegfilename[0] == 0) -// ReviewResult(); -// argc++; -// strcpy(argument[1], mpegfilename); - } + config.infile = argv[optind]; + ++optind; } - - - - // verify the argtable[] entries were allocated sucessfully - if (arg_nullcheck(argtable) != 0) + if (optind < argc) { - - // NULL entries were detected, some allocations must have failed - Debug(0, "%s: insufficient memory\n", progname); - exitcode = 1; - goto exit; + config.outdir = argv[optind]; + ++optind; } + // opt analyze end - nerrors = arg_parse(argc, argv, argtable); - if (cl_help->count) + // apply config + if (config.infile == NULL ) { - printf("Usage:\n comskip "); - arg_print_syntaxv(stdout, argtable, "\n\n"); - arg_print_glossary(stdout, argtable, " %-25s %s\n"); - printf("\nDetection Methods\n"); - printf("\t%3i - Black Frame\n", BLACK_FRAME); - printf("\t%3i - Logo\n", LOGO); - printf("\t%3i - Scene Change\n", SCENE_CHANGE); - printf("\t%3i - Resolution Change\n", RESOLUTION_CHANGE); - printf("\t%3i - Closed Captions\n", CC); - printf("\t%3i - Aspect Ratio\n", AR); - printf("\t%3i - Silence\n", SILENCE); - printf("\t%3i - CutScenes\n", CUTSCENE); - printf("\t255 - USE ALL AVAILABLE\n"); + // input file not determine + usage(); exit(2); } - if (nerrors) - { - printf("Usage:\n comskip "); - arg_print_syntaxv(stdout, argtable, "\n\n"); - arg_print_glossary(stdout, argtable, " %-25s %s\n"); - printf("\nDetection methods available:\n"); - printf("\t%3i - Black Frame\n", BLACK_FRAME); - printf("\t%3i - Logo\n", LOGO); - printf("\t%3i - Scene Change\n", SCENE_CHANGE); - printf("\t%3i - Resolution Change\n", RESOLUTION_CHANGE); - printf("\t%3i - Closed Captions\n", CC); - printf("\t%3i - Aspect Ratio\n", AR); - printf("\t%3i - Silence\n", SILENCE); - printf("\t%3i - CutScenes\n", CUTSCENE); - printf("\t255 - USE ALL AVAILABLE\n"); - printf("\nErrors:\n"); - arg_print_errors(stdout, end, "ComSkip"); - exit(2); - } + int __len = strlen(config.infile); + char* ext = config.infile + __len; + while (ext != config.infile && *(--ext) != '.'); - if (strcmp(in->extension[0], ".csv") != 0 && strcmp(in->extension[0], ".txt") != 0) + if (strcmp(ext, ".csv") != 0 && strcmp(ext, ".txt") != 0) { - sprintf(mpegfilename, "%s", in->filename[0]); - /* in_file = myfopen(in->filename[0], "rb"); - printf("Opening %s\n", in->filename[0]); - if (!in_file) { - fprintf(stderr, "%s - could not open file %s\n", strerror(errno), in->filename[0]); - exit(3); - } - */ - - - i = mystat(( char *)in->filename[0], &instat); - if (i <0) - { - fprintf(stderr, "%s - could not open file %s\n", strerror(errno), in->filename[0]); - exit(3); - - } - - sprintf(basename, "%.*s", (int)strlen(in->filename[0]) - (int)strlen(in->extension[0]), in->filename[0]); - i = strlen(basename); - while (i>0 && basename[i-1] != '\\' && basename[i-1] != '/') + sprintf(mpegfilename, "%s", config.infile); + int i = mystat((char*)config.infile, &instat); + if (i<0) { - i--; + fprintf(stderr, "%s - could not open file %s\n", strerror(errno), config.infile); + exit(3); } - strcpy(shortbasename, &basename[i]); - // sprintf(mpegfilename, "%.*s.txt", (int)strlen(basename), basename); -/* - test_file = mymyfopen(mpegfilename, "w"); - if (!test_file) + // copy file name without ext + strncpy(basename, config.infile, __len - strlen(ext)); + + // copy file name without path + __len = strlen(basename); + while (__len && basename[__len-1] != '\\' && basename[__len-1] != '/') { - fprintf(stderr, "%s - could not open file %s\n", strerror(errno), in->filename[0]); - exit(3); + --__len; } -*/ - sprintf(inifilename, "%.*scomskip.ini", i, basename); + strcpy(shortbasename, &basename[__len]); + sprintf(inifilename, "%.*scomskip.ini", __len, basename); } - else if (strcmp(in->extension[0], ".csv") == 0) + else if(strcmp(ext, ".csv") == 0) { loadingCSV = true; - in_file = myfopen(in->filename[0], "r"); - printf("Opening %s array file.\n", in->filename[0]); + in_file = myfopen(config.infile, "r"); + printf("Opening %s array file.\n", config.infile); if (!in_file) { - fprintf(stderr, "%s - could not open file %s\n", strerror(errno), in->filename[0]); + fprintf(stderr, "%s - could not open file %s\n", strerror(errno), config.infile); exit(4); } - sprintf(basename, "%.*s", (int)strlen(in->filename[0]) - (int)strlen(in->extension[0]), in->filename[0]); + sprintf(basename, "%.*s", (int)strlen(config.infile) - (int)strlen(ext), config.infile); sprintf(mpegfilename, "%.*s.mpg", (int)strlen(basename), basename); test_file = myfopen(mpegfilename, "rb"); if (!test_file) @@ -8235,30 +7338,31 @@ FILE* LoadSettings(int argc, char ** argv) } - i = strlen(basename); - while (i>0 && basename[i-1] != '\\' && basename[i-1] != '/') + __len = strlen(basename); + while (__len>0 && basename[__len-1] != '\\' && basename[__len-1] != '/') { - i--; + __len--; } - strcpy(shortbasename, &basename[i]); - sprintf(inifilename, "%.*scomskip.ini", i, basename); + strcpy(shortbasename, &basename[__len]); + sprintf(inifilename, "%.*scomskip.ini", __len, basename); if (mpegfilename[0] == 0) sprintf(mpegfilename, "%s.mpg", basename); + } - else if (strcmp(in->extension[0], ".txt") == 0) + else if(strcmp(ext, ".txt") == 0) { loadingTXT = true; output_default = false; - in_file = myfopen(in->filename[0], "r"); - printf("Opening %s for review\n", in->filename[0]); + in_file = myfopen(config.infile, "r"); + printf("Opening %s for review\n", config.infile); if (!in_file) { - fprintf(stderr, "%s - could not open file %s\n", strerror(errno), in->filename[0]); + fprintf(stderr, "%s - could not open file %s\n", strerror(errno), config.infile); exit(4); } fclose(in_file); in_file = 0; - sprintf(basename, "%.*s", (int)strlen(in->filename[0]) - (int)strlen(in->extension[0]), in->filename[0]); + sprintf(basename, "%.*s", (int)strlen(config.infile) - (int)strlen(ext), config.infile); sprintf(mpegfilename, "%.*s.mpg", (int)strlen(basename), basename); test_file = myfopen(mpegfilename, "rb"); if (!test_file) @@ -8295,31 +7399,31 @@ FILE* LoadSettings(int argc, char ** argv) fclose(test_file); } - i = strlen(basename); - while (i>0 && basename[i-1] != '\\') + __len = strlen(basename); + while (__len>0 && basename[__len-1] != '\\') { - i--; + __len--; } - strcpy(shortbasename, &basename[i]); - sprintf(inifilename, "%.*scomskip.ini", i, basename); -// sprintf(mpegfilename, "%s.mpg", basename); + strcpy(shortbasename, &basename[__len]); + sprintf(inifilename, "%.*scomskip.ini", __len, basename); } else { - printf("The input file was not a Video file or comskip CSV or TXT file - %s.\n", in->extension[0]); + printf("The input file was not a Video file or comskip CSV or TXT file - %s.\n", config.infile); exit(5); } - if (cl_ini->count) + + if (config.ini) { - sprintf(inifilename, cl_ini->filename[0]); + sprintf(inifilename, "%s", config.ini); printf("Setting ini file to %s as per commandline\n", inifilename); } ini_file = myfopen(inifilename, "r"); - if (cl_work->count) + if (config.output) { - sprintf(outputdirname, cl_work->filename[0]); + sprintf(outputdirname, config.output); i = strlen(outputdirname); if (outputdirname[i-1] == '\\') outputdirname[i-1] = 0; @@ -8332,10 +7436,9 @@ FILE* LoadSettings(int argc, char ** argv) strcpy(workbasename, basename); } - - if (out->count) + if (config.outdir) { - sprintf(outputdirname, out->filename[0]); + sprintf(outputdirname, config.outdir); i = strlen(outputdirname); if (outputdirname[i-1] == '\\') outputdirname[i-1] = 0; @@ -8347,7 +7450,7 @@ FILE* LoadSettings(int argc, char ** argv) strcpy(outbasename, basename); } - if (cl_work->count && !out->count) // --output also sets the output file location if not specified as 2nd argument. + if (config.output && !config.outdir) // --output also sets the output file location if not specified as 2nd argument. { strcpy(outbasename, workbasename); } @@ -8377,28 +7480,24 @@ FILE* LoadSettings(int argc, char ** argv) sprintf(dictfilename, "%s\\comskip.dictionary", HomeDir); } - if (cl_cut->count) + if (config.cut) { - printf("Loading cutfile %s as per commandline\n", cl_cut->filename[0]); - LoadCutScene(cl_cut->filename[0]); + printf("Loading cutfile %s as per commandline\n", config.cut); + LoadCutScene(config.cut); } - if (cl_logo->count) + if (config.logo) { - sprintf(logofilename, cl_logo->filename[0]); + sprintf(logofilename, config.logo); printf("Setting logo file to %s as per commandline\n", logofilename); } - - - // if (!loadingTXT) LoadIniFile(); - -// live_tv = true; - time(<ime); now = localtime(<ime); mil_time = (now->tm_hour * 100) + now->tm_min; + + // play_nice_start and play_nice_end set by LoadIniFile() if ((play_nice_start > -1) && (play_nice_end > -1)) { if (play_nice_start > play_nice_end) @@ -8411,51 +7510,46 @@ FILE* LoadSettings(int argc, char ** argv) } } - if (cl_verbose->count) + if (config.verbose) { - verbose = cl_verbose->ival[0]; + verbose = config.verbose; printf("Setting verbose level to %i as per command line.\n", verbose); } - if (cl_selftest->count) + if (config.selftest) { - selftest = cl_selftest->ival[0]; + selftest = config.selftest; printf("Setting selftest to %i as per command line.\n", selftest); } - if (cl_debugwindow->count || loadingTXT) + if (config.debugwindow || loadingTXT) { output_debugwindow = true; } - if (cl_timing->count) + if (config.timing) { - output_timing = TRUE; + output_timing = true; } - if (cl_show->count) + if (config.play) { subsample_video = 0; output_debugwindow = true; } - if (cl_quiet->count) + if (config.quiet) { output_console = false; } - -#ifdef COMSKIPGUI -// output_debugwindow = true; -#endif - if (strstr(argv[0],"GUI")) output_debugwindow = true; - if (cl_demux->count) + if (config.demux) { output_demux = true; } - if (!loadingTXT && !useExistingLogoFile && cl_logo->count==0) + if (!loadingTXT && !useExistingLogoFile && config.logo == false) { logo_file = myfopen(logofilename, "r"); if(logo_file) @@ -8465,18 +7559,16 @@ FILE* LoadSettings(int argc, char ** argv) } } - if (cl_output_csv->count) + if (config.csvout) { output_framearray = true; } - if (cl_output_training->count) + if (config.quality) { output_training = true; } - - if (verbose) { logo_file = myfopen(logofilename, "r"); @@ -8490,7 +7582,7 @@ FILE* LoadSettings(int argc, char ** argv) log_file = myfopen(logfilename, "w"); fprintf(log_file, "################################################################\n"); fprintf(log_file, "Generated using Comskip %s.%s\n", COMSKIPVERSION,SUBVERSION); - fprintf(log_file, "Loading comskip csv file - %s\n", in->filename[0]); + fprintf(log_file, "Loading comskip csv file - %s\n", config.infile); fprintf(log_file, "Time at start of run:\n%s", ctime(<ime)); fprintf(log_file, "################################################################\n"); fclose(log_file); @@ -8519,34 +7611,34 @@ FILE* LoadSettings(int argc, char ** argv) } } - if (cl_playnice->count) + if (config.playnice) { play_nice = true; Debug(1, "ComSkip playing nice due as per command line.\n"); } - if (cl_detectmethod->count) + if (config.detectmethod) { - commDetectMethod = cl_detectmethod->ival[0]; + commDetectMethod = config.detectmethod; printf("Setting detection methods to %i as per command line.\n", commDetectMethod); } - if (cl_dump->count) + if (config.dump) { - cutsceneno = cl_dump->ival[0]; + cutsceneno = config.dump; printf("Setting dump frame number to %i as per command line.\n", cutsceneno); } - if (cl_ts->count) + if (config.ts) { demux_pid = 1; printf("Auto selecting the PID.\n"); } - if (cl_pid->count) + if (config.pid) { -// demux_pid = cl_pid->ival[0]; - sscanf(cl_pid->sval[0],"%x", &demux_pid); + // demux_pid = cl_pid->ival[0]; + sscanf(config.pid,"%x", &demux_pid); printf("Selecting PID %x as per command line.\n", demux_pid); } @@ -8567,11 +7659,6 @@ FILE* LoadSettings(int argc, char ** argv) Debug(1, "\t%i) Logo - Give up after %i seconds\n", i, giveUpOnLogoSearch); } - if (commDetectMethod & CUTSCENE) - { -// commDetectMethod &= ~SCENE_CHANGE; - } - if (commDetectMethod & SCENE_CHANGE) { i++; @@ -8619,7 +7706,7 @@ FILE* LoadSettings(int argc, char ** argv) play_nice_start, play_nice_end, mil_time - ); + ); if (play_nice) { Debug(1, "so comskip is running slowly.\n"); @@ -8648,16 +7735,14 @@ FILE* LoadSettings(int argc, char ** argv) out_file = plist_cutlist_file = zoomplayer_cutlist_file = zoomplayer_chapter_file = vcf_file = vdr_file = projectx_file = avisynth_file = cuttermaran_file = videoredo_file = videoredo3_file = btv_file = edl_file = ipodchap_file = edlp_file = edlx_file = mls_file = womble_file = mpgtx_file = dvrcut_file = dvrmstb_file = tuning_file = training_file = 0L; - if (cl_output_plist->count) + if (config.plist) output_plist_cutlist = true; - if (cl_output_zp_cutlist->count) + if (config.zpcut) output_zoomplayer_cutlist = true; - if (cl_output_zp_chapter->count) + if (config.zpchapter) output_zoomplayer_chapter = true; - if (cl_output_vredo->count) + if (config.videoredo) output_videoredo = true; - if (cl_output_plist->count) - output_plist_cutlist = true; if (output_default && ! loadingTXT) { @@ -8677,11 +7762,6 @@ FILE* LoadSettings(int argc, char ** argv) } } -// max_commercialbreak *= fps; -// min_commercialbreak *= fps; -// max_commercial_size *= fps; -// min_commercial_size *= fps; - if (loadingTXT) { frame_count = InputReffer(".txt", true); @@ -8694,25 +7774,24 @@ FILE* LoadSettings(int argc, char ** argv) printf("Close window or hit ESCAPE when done\n"); output_debugwindow = true; ReviewResult(); -// in_file = NULL; } - if (!loadingTXT && (output_srt || output_smi )) - { - i = 0; - CEW_argv[i++] = "comskip.exe"; - if (output_smi) - { - CEW_argv[i++] = "-sami"; - output_srt = 1; - } - else - CEW_argv[i++] = "-srt"; - CEW_argv[i++] = in->filename[0]; -#ifdef PROCESS_CC - CEW_init (i, CEW_argv); -#endif - } +/* if (!loadingTXT && (output_srt || output_smi )) */ +/* { */ +/* i = 0; */ +/* CEW_argv[i++] = "comskip.exe"; */ +/* if (output_smi) */ +/* { */ +/* CEW_argv[i++] = "-sami"; */ +/* output_srt = 1; */ +/* } */ +/* else */ +/* CEW_argv[i++] = "-srt"; */ +/* CEW_argv[i++] = in->filename[0]; */ +/* #ifdef PROCESS_CC */ +/* CEW_init (i, CEW_argv); */ +/* #endif */ +/* } */ if (loadingCSV) @@ -8724,245 +7803,13 @@ FILE* LoadSettings(int argc, char ** argv) exit: - // deallocate each non-null entry in argtable[] - arg_freetable(argtable, sizeof(argtable) / sizeof(argtable[0])); return (in_file); -} -/* -#ifdef notused - -int GetAvgBrightness(void) { - int brightness = 0; - int pixels = 0; - int x; - int y; - for (y = border; y < (height - border); y += 4) { - for (x = border; x < (width - border); x += 4) { - brightness += frame_ptr[y * width + x]; - pixels++; - } - } - - return (brightness / pixels); -} - -bool CheckFrameIsBlack(void) { - int x; - int y; - int pass; - int avg = 0; - const int pass_start[7] = { 0, 4, 0, 2, 0, 1, 0 }; - const int pass_inc[7] = { 8, 8, 4, 4, 2, 2, 1 }; - const int pass_ystart[7] = { 0, 0, 4, 0, 2, 0, 1 }; - const int pass_yinc[7] = { 8, 8, 8, 4, 4, 2, 2 }; - bool isDim = false; - int dimCount = 0; - int pixelsChecked = 0; - int curMaxBright = 0; - if (!width || !height) return (false); - avg = GetAvgBrightness(); - - // go through the image in png interlacing style testing if black - // skip region 'border' pixels wide/high around border of image. - for (pass = 0; pass < 7; pass++) { - for (y = pass_ystart[pass] + border; y < (height - border); y += pass_yinc[pass]) { - for (x = pass_start[pass] + border; x < (width - border); x += pass_inc[pass]) { - pixelsChecked++; - if (frame_ptr[y * width + x] > max_brightness) return (false); - if (frame_ptr[y * width + x] > test_brightness) { - isDim = true; - dimCount++; - } - } - } - } - - if ((dimCount > (int)(.05 * pixelsChecked)) && (dimCount < (int)(.35 * pixelsChecked))) return (false); - - // frame is dim so test average - if (isDim) { - if (avg > max_avg_brightness) return (false); - } - - brightHistogram[avg]++; - InitializeBlackArray(black_count); - black[black_count].frame = framenum_real; - black[black_count].brightness = avg; - black[black_count].uniform = 0; - black[black_count].volume = curvolume; - if (avg < min_brightness_found) min_brightness_found = avg; - black_count++; - Debug(5, "Frame %6i - Black frame with brightness of %i\n", framenum_real, avg); - return (true); -} - -void BuildBlackFrameCommList(void) { - long c_start[MAX_COMMERCIALS]; - long c_end[MAX_COMMERCIALS]; - long ic_start[MAX_COMMERCIALS]; - long ic_end[MAX_COMMERCIALS]; - int commercials = 0; - int i; - int j; - int k; - int x; - int len; - int marked = 0; - double remainder; - double added; - bool oldbreak; - static int runs = 0; - if (black_count == 0) return; - - // detect individual commercials from black frames - for (i = 0; i < black_count; i++) { - for (x = i + 1; x < black_count; x++) { - int gap_length = black[x].frame - black[i].frame; - if (gap_length < min_commercial_size * fps) continue; - oldbreak = commercials > 0 && ((black[i].frame - c_end[commercials - 1]) < 10 * fps); - if (gap_length > max_commercialbreak * fps || - (!oldbreak && gap_length > max_commercial_size * fps) || - (oldbreak && (black[x].frame - c_end[commercials - 1] > max_commercial_size * fps))) - break; - - // if((!require_div5) || ((int)((float)gap_length/fps + .5) %5 == - // 0)) // look for segments in multiples of 5 seconds - added = gap_length / fps + div5_tolerance; - remainder = added - 5 * ((int)(added / 5.0)); - Debug(4, "%i,%i,%i: %.2f,%.2f\n", black[i].frame, black[x].frame, gap_length, gap_length / fps, remainder); - if ((require_div5 != 1) || (remainder >= 0 && remainder <= 2 * div5_tolerance)) { - - // look for segments in multiples of 5 seconds - if (oldbreak) { - if (black[x].frame > c_end[commercials - 1] + fps) { - - // added = (black[x].frame - - // c_end[commercials-1])/fps; - c_end[commercials - 1] = black[x].frame; - ic_end[commercials - 1] = x; - Debug( - 1, - "--start: %i, end: %i, len: %.2fs\t%.2fs\n", - black[i].frame, - black[x].frame, - (black[x].frame - black[i].frame) / fps, - (c_end[commercials - 1] - c_start[commercials - 1]) / fps - ); - } - } else { - - // new break - Debug( - 1, - "\n start: %i, end: %i, len: %.2fs\n", - black[i].frame, - black[x].frame, - ((black[x].frame - black[i].frame) / fps) - ); - ic_start[commercials] = i; - ic_end[commercials] = x; - c_start[commercials] = black[i].frame; - c_end[commercials++] = black[x].frame; - Debug( - 1, - "\n start: %i, end: %i, len: %is\n", - c_start[commercials - 1], - c_end[commercials - 1], - (int)((c_end[commercials - 1] - c_start[commercials - 1]) / fps) - ); - } - - i = x - 1; - x = black_count; - } - } - } - - Debug(1, "\n"); - if (verbose == 3 && runs == 0) { - - // list all black scene breaks - marked = 0; - commercials = 0; - for (i = 0; i < black_count; i++) { - if ((black[i].frame - marked) > 5 * fps) { - marked = black[i].frame; - commercials++; - Debug(1, "%i: %i\n", commercials, marked); - } - } - - Debug(1, "\n\n"); - } - - if (verbose == 4 && runs == 0) { - for (i = 0; i < black_count; i++) { - Debug(1, "%i\n", black[i].frame); - } - - Debug(1, "\n\n"); - } - - if (runs > 0 || require_div5 < 2) { - Debug(1, "--------------------\n"); - } - - // print out commercial breaks skipping those that are too small or too large - for (i = 0; i < commercials; i++) { - len = c_end[i] - c_start[i]; - if ((len >= (int)min_commercialbreak * fps) && (len <= (int)max_commercialbreak * fps)) { - - // find the middle of the scene change, max 3 seconds. - j = ic_start[i]; - while ((j > 0) && ((black[j].frame - black[j - 1].frame) == 1)) { - - // find beginning - j--; - } - - for (k = j; k < black_count; k++) { - - // find end - if ((black[k].frame - black[j].frame) > (int)(3 * fps)) { - break; - } - } - - x = j + (int)((k - j) / 2); - c_start[i] = black[x].frame; - j = ic_end[i]; - while ((j < black_count) && ((black[j + 1].frame - black[j].frame) == 1)) { - - // find end - j++; - } - - for (k = j; k > 0; k--) { - - // find start - if (black[j].frame - (black[k].frame) > (int)(3 * fps)) { - break; - } - } - - x = k + (int)((j - k) / 2); - c_end[i] = black[x].frame - 1; - Debug(4, "%i - start: %i end: %i\n", i + 1, c_start[i], c_end[i]); - if (require_div5 != 2) OutputCommercialBlock(c_start[i], c_end[i]); - } - } - - if (require_div5 == 2) { - require_div5 = 1; - runs++; - BuildBlackFrameCommList(); - } + printf("infile:%s\nmpegfilename:%s\nbasename:%s\nshotbasename:%s\ninifilename:%s\n",config.infile, mpegfilename, basename, shortbasename,inifilename); + exit(2); + return NULL; } -#endif -*/ - void ProcessARInfoInit(int minY, int maxY, int minX, int maxX) { double pictureHeight = maxY - minY; @@ -8973,18 +7820,12 @@ void ProcessARInfoInit(int minY, int maxY, int minX, int maxX) if (maxY >= height - border) maxY = height; if (maxX >= videowidth - border) maxX = videowidth; - /* - ar_width = width; - if (ar_width < maxY + minY) - ar_width = (int)((maxY + minY) * 1.3); - */ - last_ar_ratio = (double)(pictureWidth) / (double)pictureHeight; last_ar_ratio = ceil(last_ar_ratio * ar_rounding) / ar_rounding; ar_ratio_trend = last_ar_ratio; if (last_ar_ratio < 0.5 || last_ar_ratio > 3.0) last_ar_ratio = AR_UNDEF; -// lastAR = (last_ar_ratio <= ar_split); + ar_ratio_start = framenum_real; ar_block[ar_block_count].start = framenum_real; ar_block[ar_block_count].width = videowidth; @@ -8993,12 +7834,8 @@ void ProcessARInfoInit(int minY, int maxY, int minX, int maxX) ar_block[ar_block_count].minY = minY; ar_block[ar_block_count].maxX = maxX; ar_block[ar_block_count].maxY = maxY; -// ar_block[ar_block_count].ar = lastAR; ar_block[ar_block_count].ar_ratio = last_ar_ratio; -// if (framearray) frame[frame_count].ar_ratio = last_ar_ratio;; Debug(4, "Frame: %i\tRatio: %.2f\tMinY: %i MaxY: %i MinX: %i MaxX: %i\n", ar_ratio_start, ar_ratio_trend , minY, maxY, minX, maxX); - -// Debug(4, "\nFirst Frame\nFrame: %i\tMinY: %i\tMaxY: %i\tRatio: %.2f\n", framenum_real, minY, maxY, last_ar_ratio); } void ProcessARInfo(int minY, int maxY, int minX, int maxX) @@ -9016,11 +7853,11 @@ void ProcessARInfo(int minY, int maxY, int minX, int maxX) if (ticker_tape_percentage>0) ticker_tape = ticker_tape_percentage * height / 100; if (ticker_tape > 0 || ( - abs((height - maxY) - (minY)) < 13 + (minY )/15 && // discard for no simetrical check - abs((videowidth - maxX) - (minX)) < 13 + (minX )/15 && // discard for no simetrical check - minY < height / 4 && - minX < videowidth / 4) - ) // check if simetrical + abs((height - maxY) - (minY)) < 13 + (minY )/15 && // discard for no simetrical check + abs((videowidth - maxX) - (minX)) < 13 + (minX )/15 && // discard for no simetrical check + minY < height / 4 && + minX < videowidth / 4) + ) // check if simetrical { pictureHeight = maxY - minY; @@ -9095,27 +7932,10 @@ void ProcessARInfo(int minY, int maxY, int minX, int maxX) } else { - // Unreliable ratio -// ar_ratio_trend = cur_ar_ratio; ar_ratio_trend_counter = 0; ar_ratio_start = framenum_real; - /* - // if (framearray) frame[frame_count].minY = 0; - // if (framearray) frame[frame_count].maxY = height; - // Debug(9, "Frame: %i\tAsimetrical\tMinY: %i\tMaxY: %i\n", framenum_real, minY, maxY); - ar_ratio_trend_counter = 0; - ar_ratio_start = framenum_real; - ar_misratio_trend_counter++; - if (framearray) frame[frame_count].ar_ratio = 0.0; - */ - } - /* - if (last_ar_ratio == 0) { - ar_misratio_trend_counter = 0; - } else { - */ if (ar_misratio_trend_counter > 3*fps && last_ar_ratio != AR_UNDEF) { last_ar_ratio = ar_ratio_trend = AR_UNDEF; @@ -9137,10 +7957,6 @@ void ProcessARInfo(int minY, int maxY, int minX, int maxX) Debug(9, "Frame: %i\tRatio: %.2f\tMinY: %i\tMaxY: %i\n", ar_ratio_start, ar_ratio_trend , minY, maxY); last_ar_ratio = ar_ratio_trend; } -// } - - -// if (framearray) frame[frame_count].ar_ratio = last_ar_ratio; } @@ -9190,7 +8006,7 @@ void RecordCutScene(int frame_count, int brightness) } } cutscene_file = NULL; -//GetDumpFileName(); + if (osname[0]) { strcpy(cutscenefile, osname); @@ -9230,7 +8046,6 @@ void LoadCutScene(const char *filename) b = 0; for (j = 0; j < c; j++) b += cutscene[i][j]; - // csbrightness[i] = b/c; cutscenes++; fclose(cutscene_file); } @@ -9304,7 +8119,6 @@ bool CheckSceneHasChanged(void) } if (brightCountminY < 5) { - //brightCountminY = 0; minY = y; } y = height - border - delta; @@ -9319,7 +8133,6 @@ bool CheckSceneHasChanged(void) } if (brightCountmaxY < 5) { - //brightCountmaxY = 0; maxY = y; } x = border + delta; @@ -9334,7 +8147,6 @@ bool CheckSceneHasChanged(void) } if (brightCountminX < 5) { - //brightCountminX = 0; minX = x; } x = videowidth - border - delta; @@ -9351,7 +8163,6 @@ bool CheckSceneHasChanged(void) } if (brightCountmaxX < 5) { - //brightCountmaxX = 0; maxX = x; } } @@ -9432,10 +8243,6 @@ bool CheckSceneHasChanged(void) return (false); } - if ( 17652 < frame_count && frame_count < 17657 ) - { -// OutputFrame(frame_count); - } ProcessARInfo(minY, maxY,minX, maxX); if (framearray) frame[frame_count].ar_ratio = last_ar_ratio; @@ -9448,7 +8255,7 @@ bool CheckSceneHasChanged(void) brightness += histogram[i] * i; if (histogram[i]) hasBright++; -// if (histogram[i] != lastHistogram[i]) similar += abs( histogram[i] - lastHistogram[i]); + if (histogram[i] < lastHistogram[i]) similar += histogram[i]; else similar += lastHistogram[i]; } @@ -9458,7 +8265,7 @@ bool CheckSceneHasChanged(void) pixels += histogram[i]; brightness += histogram[i] * i; dimCount += histogram[i]; -// if (histogram[i] != lastHistogram[i]) similar += abs( histogram[i] - lastHistogram[i]); + if (histogram[i] < lastHistogram[i]) similar += histogram[i]; else similar += lastHistogram[i]; } @@ -9467,7 +8274,7 @@ bool CheckSceneHasChanged(void) { pixels += histogram[i]; brightness += histogram[i] * i; -// if (histogram[i] != lastHistogram[i]) similar += abs( histogram[i] - lastHistogram[i]); + if (histogram[i] < lastHistogram[i]) similar += histogram[i]; else similar += lastHistogram[i]; } @@ -9525,37 +8332,18 @@ bool CheckSceneHasChanged(void) x = i; } } - /* Not tested - if (x > 10 && (frame_count % 2) == 0) { - x = x + 5; - if (x > max_avg_brightness) { - max_avg_brightness++; - test_brightness++; - max_brightness++; - } else if (x < max_avg_brightness) { - max_avg_brightness--; - test_brightness--; - max_brightness--; - } - } - */ + if (framearray) frame[frame_count].brightness = brightness; brightHistogram[brightness]++; uniformHistogram[(uniform/UNIFORMSCALE < 255 ? uniform/UNIFORMSCALE : 255)]++; if ((dimCount > (int)(.05 * width * height)) && (dimCount < (int)(.35 * width * height))) isDim = true; sceneChangePercent = (int)(100.0 * similar / pixels); -// sceneChangePercent = (int)(100.0 * (1.0 - ((float)abs(prevsimilar - similar) / pixels))); prevsimilar = similar; if (framearray) frame[frame_count].schange_percent = sceneChangePercent; -// cause = ProcessClues(frame_count, brightness, hasBright, isDim, uniform, sceneChangePercent, curvolume, -// if (framearray) frame[frame_count].isblack = cause; -// if (cause != 0) -// InsertBlackFrame(framenum_real,brightness,uniform,curvolume,cause; - cause = 0; if (commDetectMethod & BLACK_FRAME) { @@ -9579,7 +8367,6 @@ bool CheckSceneHasChanged(void) } } - // if (commDetectMethod & RESOLUTION_CHANGE) { if ((old_width != 0 && width != old_width) || (old_height != 0 && height != old_height)) { @@ -9593,13 +8380,6 @@ bool CheckSceneHasChanged(void) old_height = height; } - - /* - if (abs(brightness - last_brightness) > brightness_jump) { - cause |= C_s; - Debug(7, "Frame %6i - Black frame because large brightness change from %i to %i with uniform %i\n", framenum_real, last_brightness, brightness, uniform); - } // else - */ if (commDetectMethod & SCENE_CHANGE) { @@ -9618,42 +8398,6 @@ bool CheckSceneHasChanged(void) } } - /* - if ((sceneChangePercent < 10) && (!hasBright) && !(cause & C_b)) { - Debug( - 7, - "Frame %6i - BlackFrame detected because of a nonbright scene change:\tsc - %i\tavg - %i\n", - framenum_real, - sceneChangePercent, - brightness - ); - cause |= C_s; - } else if ((sceneChangePercent < 20) && (!hasBright) && !(cause & C_b)) { - - - - - if (brightness < last_brightness * 2) { - InitializeSchangeArray(schange_count); - schange[schange_count].percentage = sceneChangePercent; - schange[schange_count].frame = framenum_real; - schange_count++; - memcpy(lastHistogram, histogram, sizeof(histogram)); - // Debug(7, "Frame %6i - Scene change with change percentage of %i\n", framenum_real, sceneChangePercent); - return (true); - } - if (0) { - Debug( - 7, - "Frame %6i - BlackFrame detected because of scene change with brightness double:\tsc - %i\tavg - %i.................................................................\n", - framenum_real, - sceneChangePercent, - brightness - ); - cause |= C_s; - } - */ - } if (sceneChangePercent < schange_threshold) { @@ -9662,8 +8406,6 @@ bool CheckSceneHasChanged(void) schange[schange_count].percentage = sceneChangePercent; schange[schange_count].frame = framenum_real; schange_count++; -// memcpy(lastHistogram, histogram, sizeof(histogram)); - // Debug(7, "Frame %6i - Scene change with change percentage of %i\n", framenum_real, sceneChangePercent); } for (i=0; i < 255; i++) @@ -9675,7 +8417,6 @@ bool CheckSceneHasChanged(void) frame_count = frame_count; if (framearray) frame[frame_count].cutscenematch = 100; -// if (brightness > max_avg_brightness + 10) { if (framearray) frame[frame_count].cutscenematch = 100; @@ -9702,8 +8443,6 @@ bool CheckSceneHasChanged(void) return (false); } - - // Subroutines for Logo Detection void PrintLogoFrameGroups(void) { @@ -9738,7 +8477,7 @@ void PrintLogoFrameGroups(void) dblSecondsToStrMinutes(F2L(logo_block[i].end, logo_block[i].start)), F2L(logo_block[i].start, cblock[f].f_start), F2L(cblock[t].f_end, logo_block[i].end) - ); + ); count += logo_block[i].end - logo_block[i].start + 1; @@ -9796,7 +8535,7 @@ void PrintCCBlocks(void) "Removing cc cblock %i because the length is %.2f.\n", i, F2L(cc_block[i].end_frame, cc_block[i].start_frame) - ); + ); for (j = i; j < cc_block_count - 1; j++) { cc_block[j].start_frame = cc_block[j + 1].start_frame; @@ -9815,7 +8554,7 @@ void PrintCCBlocks(void) cc_block[0].start_frame, cc_block[0].end_frame, CCTypeToStr(cc_block[0].type) - ); + ); Debug(2, "\tlength - %s\n", dblSecondsToStrMinutes(F2L(cc_block[0].end_frame, cc_block[0].start_frame))); cc_count[cc_block[0].type] += cc_block[0].end_frame - cc_block[0].start_frame + 1; @@ -9828,7 +8567,7 @@ void PrintCCBlocks(void) cc_block[i].start_frame, cc_block[i].end_frame, CCTypeToStr(cc_block[i].type) - ); + ); Debug(2, "\tlength - %s\n", dblSecondsToStrMinutes(F2L(cc_block[i].end_frame, cc_block[i].start_frame))); cc_count[cc_block[i].type] += cc_block[i].end_frame - cc_block[i].start_frame + 1; } @@ -9840,28 +8579,28 @@ void PrintCCBlocks(void) cc_count[POPON], ((double)cc_count[POPON] / (double)framesprocessed) * 100.0, dblSecondsToStrMinutes(cc_count[POPON] / fps) - ); + ); Debug( 2, "Roll up captions: %6i:%5.2f - %s\n", cc_count[ROLLUP], ((double)cc_count[ROLLUP] / (double)framesprocessed) * 100.0, dblSecondsToStrMinutes(cc_count[ROLLUP] / fps) - ); + ); Debug( 2, "Paint on captions: %6i:%5.2f - %s\n", cc_count[PAINTON], ((double)cc_count[PAINTON] / (double)framesprocessed) * 100.0, dblSecondsToStrMinutes(cc_count[PAINTON] / fps) - ); + ); Debug( 2, "No captions: %6i:%5.2f - %s\n", cc_count[NONE], ((double)cc_count[NONE] / (double)framesprocessed) * 100.0, dblSecondsToStrMinutes(cc_count[NONE] / fps) - ); + ); for (i = 0; i <= 4; i++) { if (cc_count[i] > cc_count[most_cc_type]) @@ -9873,111 +8612,39 @@ void PrintCCBlocks(void) Debug(2, "The %s type of closed captions were determined to be the most common.\n", CCTypeToStr(most_cc_type)); } -/* -static edge_inc = 1; -static edge_dec = 20; - - -void EdgeCount(unsigned char* frame_ptr) { - int i,index; - int x; - int y; - unsigned char herePixel; - static int framecnt; - - edge_count = 0; - if (aggressive_logo_rejection) { - for (y = edge_radius + (int)(height * borderIgnore); y < (subtitles? height/2 : (height - edge_radius - (int)(height * borderIgnore))); y++) { - for (x = edge_radius + (int)(width * borderIgnore); x < (width - edge_radius - (int)(width * borderIgnore)); x++) { - herePixel = frame_ptr[y * width + x]; - if ( - (abs(frame_ptr[y * width + (x - edge_radius)] - herePixel) >= edge_level_threshold) - ) { - if (hor_edgecount[y * width + x] <= num_logo_buffers) - hor_edgecount[y * width + x]++; - else - edge_count++; - } else - hor_edgecount[y * width + x] = 0; - - if ( - (abs(frame_ptr[(y - edge_radius) * width + x] - herePixel) >= edge_level_threshold) - ) { - if (ver_edgecount[y * width + x] <= num_logo_buffers) - ver_edgecount[y * width + x]++; - else - edge_count++; - } else - ver_edgecount[y * width + x] = 0; - } - } - } else { - for (y = edge_radius + (int)(height * borderIgnore); y < (subtitles? height/2 : (height - edge_radius - (int)(height * borderIgnore))); y++) { - for (x = edge_radius + (int)(width * borderIgnore); x < (width - edge_radius - (int)(width * borderIgnore)); x++) { - herePixel = frame_ptr[y * width + x]; - if ( - (abs(frame_ptr[y * width + (x - edge_radius)] - herePixel) >= edge_level_threshold) || - (abs(frame_ptr[y * width + (x + edge_radius)] - herePixel) >= edge_level_threshold) - ) { - if (hor_edgecount[y * width + x] < num_logo_buffers) - hor_edgecount[y * width + x]++; - else - edge_count++; - } else - hor_edgecount[y * width + x] = 0; - - if ( - (abs(frame_ptr[(y - edge_radius) * width + x] - herePixel) >= edge_level_threshold) || - (abs(frame_ptr[(y + edge_radius) * width + x] - herePixel) >= edge_level_threshold) - ) { - if (ver_edgecount[y * width + x] < num_logo_buffers) - ver_edgecount[y * width + x]++; - else - edge_count++; - } else - ver_edgecount[y * width + x] = 0; - } - } - } - if (edge_count > 350) - logoBuffersFull = true; -} - -*/ #define TEST_HEDGE1(FRAME,X,Y) (abs(FRAME[(Y) * width + (X) - edge_radius] - FRAME[(Y) * width + (X) + edge_radius] ) >= edge_level_threshold) #define TEST_VEDGE1(FRAME,X,Y) (abs(FRAME[((Y) - edge_radius) * width + (X)] - FRAME[((Y) + edge_radius) * width + (X)]) >= edge_level_threshold) #define TEST_HEDGE0(FRAME,X,Y) (abs(FRAME[(Y) * width + (X) - edge_radius] - FRAME[(Y) * width + (X)] ) >= edge_level_threshold) || \ - (abs(FRAME[(Y) * width + (X) + edge_radius] - FRAME[(Y) * width + (X)] ) >= edge_level_threshold) + (abs(FRAME[(Y) * width + (X) + edge_radius] - FRAME[(Y) * width + (X)] ) >= edge_level_threshold) #define TEST_VEDGE0(FRAME,X,Y) (abs(FRAME[((Y) - edge_radius) * width + (X)] - FRAME[((Y)) * width + (X)]) >= edge_level_threshold) || \ - (abs(FRAME[((Y) + edge_radius) * width + (X)] - FRAME[((Y)) * width + (X)]) >= edge_level_threshold) + (abs(FRAME[((Y) + edge_radius) * width + (X)] - FRAME[((Y)) * width + (X)]) >= edge_level_threshold) #define TEST_HEDGE2(FRAME,X,Y) (abs((FRAME[(Y) * width + (X) - edge_radius - 1] + FRAME[(Y) * width + (X) - edge_radius] + FRAME[(Y) * width + (X) - edge_radius + 1]) - \ - (FRAME[(Y) * width + (X) + edge_radius - 1] + FRAME[(Y) * width + (X) + edge_radius] + FRAME[(Y) * width + (X) + edge_radius + 1]) )/3 >= edge_level_threshold) + (FRAME[(Y) * width + (X) + edge_radius - 1] + FRAME[(Y) * width + (X) + edge_radius] + FRAME[(Y) * width + (X) + edge_radius + 1]) )/3 >= edge_level_threshold) #define TEST_VEDGE2(FRAME,X,Y) (abs((FRAME[((Y) - edge_radius - 1) * width + (X)] + FRAME[((Y) - edge_radius) * width + (X)] + FRAME[((Y) - edge_radius + 1) * width + (X)]) - \ - (FRAME[((Y) + edge_radius - 1) * width + (X)] + FRAME[((Y) + edge_radius) * width + (X)] + FRAME[((Y) + edge_radius + 1) * width + (X)]) )/3 >= edge_level_threshold) + (FRAME[((Y) + edge_radius - 1) * width + (X)] + FRAME[((Y) + edge_radius) * width + (X)] + FRAME[((Y) + edge_radius + 1) * width + (X)]) )/3 >= edge_level_threshold) -#define TEST_HEDGE3(FRAME,X,Y) (abs((\ -FRAME[((Y)-edge_radius)*width+(X)-edge_radius]-FRAME[((Y)-edge_radius)*width+(X)+edge_radius] +\ -FRAME[((Y) )*width+(X)-edge_radius]-FRAME[((Y) )*width+(X)+edge_radius] +\ -FRAME[((Y)+edge_radius)*width+(X)-edge_radius]-FRAME[((Y)+edge_radius)*width+(X)+edge_radius])\ -) >= edge_level_threshold) +#define TEST_HEDGE3(FRAME,X,Y) (abs(( \ + FRAME[((Y)-edge_radius)*width+(X)-edge_radius]-FRAME[((Y)-edge_radius)*width+(X)+edge_radius] + \ + FRAME[((Y) )*width+(X)-edge_radius]-FRAME[((Y) )*width+(X)+edge_radius] + \ + FRAME[((Y)+edge_radius)*width+(X)-edge_radius]-FRAME[((Y)+edge_radius)*width+(X)+edge_radius]) \ + ) >= edge_level_threshold) -#define TEST_VEDGE3(FRAME,X,Y) (abs((\ -FRAME[((Y)-edge_radius)*width+(X)-edge_radius]-FRAME[((Y)+edge_radius)*width+(X)-edge_radius] +\ -FRAME[((Y)-edge_radius)*width+(X) ]-FRAME[((Y)+edge_radius)*width+(X) ] +\ -FRAME[((Y)-edge_radius)*width+(X)+edge_radius]-FRAME[((Y)+edge_radius)*width+(X)+edge_radius])\ -) >= edge_level_threshold) +#define TEST_VEDGE3(FRAME,X,Y) (abs(( \ + FRAME[((Y)-edge_radius)*width+(X)-edge_radius]-FRAME[((Y)+edge_radius)*width+(X)-edge_radius] + \ + FRAME[((Y)-edge_radius)*width+(X) ]-FRAME[((Y)+edge_radius)*width+(X) ] + \ + FRAME[((Y)-edge_radius)*width+(X)+edge_radius]-FRAME[((Y)+edge_radius)*width+(X)+edge_radius]) \ + ) >= edge_level_threshold) #define AR_DIST 20 #define LOGO_Y_LOOP for (y = (logo_at_bottom ? height/2 : edge_radius + border); y < (subtitles? height/2 : (height - edge_radius - border)); y += edge_step) -// #define LOGO_X_LOOP for (x = max(edge_radius + (int)(width * borderIgnore), minX+AR_DIST); x < min((width - edge_radius - (int)(width * borderIgnore)),maxX-AR_DIST); x += edge_step) #define LOGO_X_LOOP for (x = edge_radius + border; x < (videowidth - edge_radius - border); x += edge_step) void EdgeDetect(unsigned char* frame_ptr, int maskNumber) @@ -9985,9 +8652,7 @@ void EdgeDetect(unsigned char* frame_ptr, int maskNumber) int i; int x; int y; - // unsigned char temp[MAXWIDTH * MAXHEIGHT]; unsigned char herePixel; -// memset(for (i = 0; i <= (width * height); i++) temp[i] = 0; hedge_count = 0; vedge_count = 0; #ifdef MAXMIN_LOGO_SEARCH @@ -10017,13 +8682,13 @@ void EdgeDetect(unsigned char* frame_ptr, int maskNumber) { herePixel = frame_ptr[y * width + x]; if ((abs(frame_ptr[y * width + (x - edge_radius)] - herePixel) >= edge_level_threshold) || - (abs(frame_ptr[y * width + (x + edge_radius)] - herePixel) >= edge_level_threshold)) + (abs(frame_ptr[y * width + (x + edge_radius)] - herePixel) >= edge_level_threshold)) { horiz_edges[maskNumber][y * width + x] = 1; } if ((abs(frame_ptr[(y - edge_radius) * width + x] - herePixel) >= edge_level_threshold) || - (abs(frame_ptr[(y + edge_radius) * width + x] - herePixel) >= edge_level_threshold)) + (abs(frame_ptr[(y + edge_radius) * width + x] - herePixel) >= edge_level_threshold)) { vert_edges[maskNumber][y * width + x] = 1; } @@ -10081,7 +8746,6 @@ void EdgeDetect(unsigned char* frame_ptr, int maskNumber) ver_edgecount[y * width + x] = 0; } } -// printf("%6d %6d\n", hedge_count, vedge_count); } else if (aggressive_logo_rejection==3) { @@ -10543,7 +9207,7 @@ bool ProcessLogoTest(int framenum_real, int curLogoTest, int close) logoTrendCounter = 0; logo_block[logo_block_count].end = framenum_real - 1 * (int)(fps * logoFreq); if (logo_block[logo_block_count].end - logo_block[logo_block_count].start > - 2*(int)(shrink_logo*fps) + (shrink_logo_tail*fps) ) + 2*(int)(shrink_logo*fps) + (shrink_logo_tail*fps) ) { logo_block[logo_block_count].end -= (int)(shrink_logo*fps) + (int)(shrink_logo_tail*fps); logo_block[logo_block_count].start += (int)(shrink_logo*fps); @@ -10556,12 +9220,12 @@ bool ProcessLogoTest(int framenum_real, int curLogoTest, int close) frame[i].logo_present = false; } Debug - (3, - "\nEnd logo block %i\tframe %i\tLength - %s\n", - logo_block_count, - logo_block[logo_block_count].end, - dblSecondsToStrMinutes(F2L(logo_block[logo_block_count].end, logo_block[logo_block_count].start)) - ); + (3, + "\nEnd logo block %i\tframe %i\tLength - %s\n", + logo_block_count, + logo_block[logo_block_count].end, + dblSecondsToStrMinutes(F2L(logo_block[logo_block_count].end, logo_block[logo_block_count].start)) + ); logo_block_count++; InitializeLogoBlockArray( logo_block_count); } @@ -10594,7 +9258,7 @@ bool ProcessLogoTest(int framenum_real, int curLogoTest, int close) "\t\t\t\tStart logo cblock %i\tframe %i\n", logo_block_count, logo_block[logo_block_count].start - ); + ); } else { @@ -10604,7 +9268,7 @@ bool ProcessLogoTest(int framenum_real, int curLogoTest, int close) dblSecondsToStrMinutes(F2L(logo_block[logo_block_count].start, logo_block[logo_block_count - 1].end)), logo_block_count, logo_block[logo_block_count].start - ); + ); } } @@ -10627,17 +9291,6 @@ void ResetLogoBuffers(void) if (newestLogoBuffer == num_logo_buffers) newestLogoBuffer = 0; // rotates buffer logoFrameNum[newestLogoBuffer] = framenum_real; oldestLogoBuffer = 0; - /* - for (i = 0; i < num_logo_buffers; i++) { - free(logoFrameBuffer[i]); - } - for (i = 0; i < num_logo_buffers; i++) { - logoFrameBuffer[i] = malloc(width * height * sizeof(frame_ptr[0])); - if (logoFrameBuffer[i] == NULL) { - Debug(0, "Could not allocate memory for logo frame buffer %i\n", i); - exit(16); - } - */ } void FillLogoBuffer(void) @@ -10656,13 +9309,6 @@ void FillLogoBuffer(void) i = min(logoFrameBufferSize, width * height * sizeof(frame_ptr[0])); memcpy(logoFrameBuffer[newestLogoBuffer], frame_ptr, i); - -// for (y = 0; y < height; y++) { -// for (x = 0; x < width; x++) { -// logoFrameBuffer[newestLogoBuffer][y * width + x] = frame_ptr[y * width + x]; -// } -// } - EdgeDetect(logoFrameBuffer[newestLogoBuffer], newestLogoBuffer); if ((!logoBuffersFull) && (newestLogoBuffer == num_logo_buffers - 1)) logoBuffersFull = true; } @@ -10757,16 +9403,10 @@ bool SearchForLogoEdges(void) #else memset(thoriz_edgemask, 0, width * height); memset(tvert_edgemask, 0, width * height); -// minY = (logo_at_bottom ? height/2 : edge_radius + (int)(height * borderIgnore)); -// if (framearray) minY = max(minY, frame[frame_count].minY); -// maxY = (subtitles? height/2 : height - edge_radius - (int)(height * borderIgnore)); -// if (framearray) maxY = min(maxY, frame[frame_count].maxY); LOGO_X_LOOP { LOGO_Y_LOOP { -// for (y = minY; y < maxY; y++) { -// for (x = edge_radius + (int)(width * borderIgnore); x < videowidth - edge_radius + (int)(width * borderIgnore); x++) { if (hor_edgecount[y * width + x]>= num_logo_buffers) { thoriz_edgemask[y * width + x] = 1; @@ -10800,12 +9440,6 @@ bool SearchForLogoEdges(void) logoPercentageOfScreen = (double)((tlogoMaxY - tlogoMinY) * (tlogoMaxX - tlogoMinX)) / (double)(height * width); if (logoPercentageOfScreen > logo_max_percentage_of_screen) { -// Debug( -// 3, -// "Reducing logo search area!\tPercentage of screen - %.2f%% TOO BIG.\n", -// logoPercentageOfScreen * 100 -// ); - if (tempMinX > tlogoMinX+50) tlogoMinX = tempMinX; if (tempMaxX < tlogoMaxX-50) tlogoMaxX = tempMaxX; if (tempMinY > tlogoMinY+50) tlogoMinY = tempMinY; @@ -10813,8 +9447,7 @@ bool SearchForLogoEdges(void) } i = CountEdgePixels(); -//printf("Edges=%d\n",i); -// if (i > 350/(lowres+1)/(edge_step)) { + if (i > 180 * scale /edge_step) { logoPercentageOfScreen = (double)((tlogoMaxY - tlogoMinY) * (tlogoMaxX - tlogoMinX)) / (double)(height * width); @@ -10825,13 +9458,11 @@ bool SearchForLogoEdges(void) "Edge count - %i\tPercentage of screen - %.2f%% TOO BIG, CAN'T BE A LOGO.\n", i, logoPercentageOfScreen * 100 - ); -// logoInfoAvailable = false; + ); } else { Debug(3, "Edge count - %i\tPercentage of screen - %.2f%%, Check: %i\n", i, logoPercentageOfScreen * 100,doublCheckLogoCount); -// logoInfoAvailable = true; logoFound = true; } } @@ -10884,7 +9515,7 @@ bool SearchForLogoEdges(void) } if (LogoIsThere) { -// Debug(7, "Logo present in frame %i.\n", logoFrameNum[i]); + // Debug(7, "Logo present in frame %i.\n", logoFrameNum[i]); sum++; } else @@ -10912,28 +9543,7 @@ bool SearchForLogoEdges(void) logo_block[logo_block_count].start = last_non_logo_frame+1; DumpEdgeMasks(); -// DumpEdgeMask(choriz_edgemask, HORIZ); -// DumpEdgeMask(cvert_edgemask, VERT); -// for (i = 0; i < num_logo_buffers; i++) { -#if MULTI_EDGE_BUFFER -// free(vert_edges[i]); -// free(horiz_edges[i]); -#endif -// free(logoFrameBuffer[i]); -// } -#if MULTI_EDGE_BUFFER -// free(vert_edges); -// vert_edges = NULL -// free(horiz_edges); -// horiz_edges = NULL; -#else -// free(horiz_count); -// horiz_count = NULL; -// free(vert_count); -// vert_count = NULL; -#endif -// free(logoFrameBuffer); -// logoFrameBuffer = NULL; + InitScanLines(); InitHasLogo(); @@ -10941,7 +9551,6 @@ bool SearchForLogoEdges(void) } else { -// logoInfoAvailable = false; //xxxxxxx currentGoodEdge = 0.0; } @@ -10984,7 +9593,7 @@ int ClearEdgeMaskArea(unsigned char* temp, unsigned char* test) if (temp[y * width + x] == 1) { if (test[y * width + x] == 1) -// goto found; + // goto found; count++; for (offset = edge_step; offset < MAX_SEARCH; offset += edge_step) @@ -10992,30 +9601,30 @@ int ClearEdgeMaskArea(unsigned char* temp, unsigned char* test) iy = offset; for (ix= -offset; ix <= offset; ix += edge_step) if (y+iy > 0 && y+iy 0 && x+ix < videowidth && test[(y+iy) * width + x+ix] == 1) -// goto found; + // goto found; count++; iy = -offset; for (ix= -offset; ix <= offset; ix += edge_step) if (y+iy > 0 && y+iy 0 && x+ix < videowidth && test[(y+iy) * width + x+ix] == 1) -// goto found; + // goto found; count++; ix = offset; for (iy= -offset+edge_step; iy <= offset-edge_step; iy += edge_step) if (y+iy > 0 && y+iy 0 && x+ix < videowidth && test[(y+iy) * width + x+ix] == 1) -// goto found; + // goto found; count++; ix = -offset; for (iy= -offset+edge_step; iy <= offset-edge_step; iy += edge_step) if (y+iy > 0 && y+iy 0 && x+ix < videowidth && test[(y+iy) * width + x+ix] == 1) -// goto found; + // goto found; count++; if (count >= edge_weight) goto found; } temp[y * width + x] = 0; continue; -found: + found: valid++; } } @@ -11070,7 +9679,7 @@ int CountEdgePixels(void) } } count = hcount + vcount; -// printf("%6d %6d\n",hcount, vcount); + // printf("%6d %6d\n",hcount, vcount); if ((hcount < 50 * scale / edge_step) || (vcount < 50 * scale /edge_step )) count = 0; return (count); } @@ -11398,21 +10007,7 @@ void LoadLogoMaskData(void) } logo_file = myfopen(logofilename, "r"); - /* - choriz_edgemask = malloc(width * height * sizeof(unsigned char)); - if (choriz_edgemask == NULL) { - Debug(0, "Could not allocate memory for horizontal edgemask\n"); - exit(8); - } - - cvert_edgemask = malloc(width * height * sizeof(unsigned char)); - if (cvert_edgemask == NULL) { - Debug(0, "Could not allocate memory for vertical edgemask\n"); - exit(9); - } - memset(choriz_edgemask, 0, width * height); - memset(cvert_edgemask, 0, width * height); - */ + do { temp = getc(logo_file); @@ -11515,12 +10110,16 @@ void LoadLogoMaskData(void) isSecondPass = true; if (!loadingCSV) { -// DumpEdgeMask(choriz_edgemask, HORIZ); -// DumpEdgeMask(cvert_edgemask, VERT); DumpEdgeMasks(); } memset(data, 0, sizeof(data)); + +#ifdef _WIN32 _flushall(); +#else + fflush(NULL); +#endif + if (output_default) { txt_file = myfopen(out_filename, "r"); @@ -11594,7 +10193,14 @@ void Debug(int level, char* fmt, ...) vsprintf(debugText, fmt, ap); va_end(ap); - if (output_console) _cprintf("%s", debugText); + if (output_console) + { +#ifdef _WIN32 + _cprintf("%s", debugText); +#else + printf("%s", debugText); +#endif + } if (!log_file) log_file = myfopen(logfilename, "a+"); @@ -11620,19 +10226,7 @@ void InitLogoBuffers(void) exit(14); } memset(logoFrameNum, 0,num_logo_buffers*sizeof(int)); - /* - if(!choriz_edgemask) choriz_edgemask = malloc(width * height * sizeof(unsigned char)); - if (choriz_edgemask == NULL) { - Debug(0, "Could not allocate memory for horizontal edgemask\n"); - exit(14); - } - - if(!cvert_edgemask) cvert_edgemask = malloc(width * height * sizeof(unsigned char)); - if (cvert_edgemask == NULL) { - Debug(0, "Could not allocate memory for vertical edgemask\n"); - exit(15); - } - */ + if(!logoFrameBuffer) { logoFrameBuffer = malloc(num_logo_buffers * sizeof(unsigned char *)); @@ -11658,6 +10252,7 @@ void InitLogoBuffers(void) exit(16); } } + #if MULTI_EDGE_BUFFER if(!horiz_edges) { @@ -11681,18 +10276,7 @@ void InitLogoBuffers(void) exit(18); } } -#else - /* - horiz_count = malloc(width * height * sizeof(unsigned char)); - if (horiz_count == NULL) { - Debug(0, "Could not allocate memory for horizontal count buffer\n"); - exit(17); - } - memset(horiz_count, 0, width * height * sizeof(unsigned char)); - */ -#endif -#if MULTI_EDGE_BUFFER if(!vert_edges) { vert_edges = malloc(num_logo_buffers * sizeof(unsigned char *)); @@ -11714,16 +10298,8 @@ void InitLogoBuffers(void) exit(20); } } -#else - /* - vert_count = malloc(width * height * sizeof(unsigned char)); - if (vert_count == NULL) { - Debug(0, "Could not allocate memory for vertical count buffer\n"); - exit(17); - } - memset(vert_count, 0, width * height * sizeof(unsigned char)); - */ #endif + } void InitComSkip(void) @@ -11750,7 +10326,6 @@ void InitComSkip(void) } } -// if (commDetectMethod & BLACK_FRAME) { if(!initialized) { max_black_count = 500; @@ -11761,10 +10336,6 @@ void InitComSkip(void) Debug(0, "Could not allocate memory for black frame array\n"); exit(11); } -// } else { -// Debug(1, "ERROR: ComSkip cannot run without black frames.\n"); -// exit(100); -// } if (commDetectMethod & LOGO) { @@ -11779,12 +10350,9 @@ void InitComSkip(void) exit(13); } -// if (!logoInfoAvailable) { InitLogoBuffers(); -// } memset(max_br, 0, sizeof(max_br)); memset(min_br, 255, sizeof(min_br)); - } if (commDetectMethod & SCENE_CHANGE) @@ -11867,7 +10435,7 @@ void InitComSkip(void) } } -// if (commDetectMethod & AR) { + // if (commDetectMethod & AR) { if(!initialized) { max_ar_block_count = 100; @@ -11878,7 +10446,7 @@ void InitComSkip(void) Debug(0, "Could not allocate memory for aspect ratio cblock array\n"); exit(31); } -// } + // } cc.cc1[0] = 0; cc.cc1[1] = 0; @@ -11907,14 +10475,14 @@ void InitComSkip(void) framenum_real = 0; frames_with_logo = 0; framenum = 0; - lastLogoTest = FALSE; + lastLogoTest = false; logoTrendCounter = 0; -// audio_framenum = 0; + // audio_framenum = 0; cc_block_count = 0; cc_text_count = 0; logo_block_count = 0; -// pts = 0; + // pts = 0; ascr=scr=0; InitScanLines(); InitHasLogo(); @@ -12278,8 +10846,6 @@ int FindUniformThreshold(double percentile) while (tempCount < targetCount); if (i == 0) i = 1; -// while (uniformHistogram[i+1] < uniformHistogram[i]) -// i++; return ((i+1)*UNIFORMSCALE); } @@ -12420,7 +10986,7 @@ int InputReffer(char *extension, int setfps) if (frames == 0) frames = reffer[reffer_count].end_frame; if (reffer[reffer_count].end_frame == reffer[reffer_count].start_frame+1 && - reffer[reffer_count].end_frame == frames) + reffer[reffer_count].end_frame == frames) reffer_count--; } @@ -12435,7 +11001,7 @@ int InputReffer(char *extension, int setfps) } -//#ifdef faslpositive_negative + //#ifdef faslpositive_negative j = 0; i = 0; state = both_show; @@ -12542,7 +11108,7 @@ int InputReffer(char *extension, int setfps) state = both_commercial; k = commercial[j].start_frame; } -// fprintf(raw, "False negative at frame %6ld of %6.1f seconds\n", pk , (k - pk)/fps ); + // fprintf(raw, "False negative at frame %6ld of %6.1f seconds\n", pk , (k - pk)/fps ); if (output_training > 1) raw2 = myfopen("quality.csv", "a+"); if (raw2) fprintf(raw2, "\"%s\", %6ld, %6.1f, %6.1f, %6.1f\n", basename, pk, F2L(k, pk), 0.0, 0.0); fneg += F2L(k,pk); @@ -12561,7 +11127,7 @@ int InputReffer(char *extension, int setfps) state = both_commercial; k = reffer[i].start_frame; } -// fprintf(raw, "False positive at frame %6ld of %6.1f seconds\n", pk , (k - pk)/fps ); + // fprintf(raw, "False positive at frame %6ld of %6.1f seconds\n", pk , (k - pk)/fps ); if (output_training > 1) raw2 = myfopen("quality.csv", "a+"); if (raw2) fprintf(raw2, "\"%s\", %6ld, %6.1f, %6.1f, %6.1f\n", basename, pk, 0.0, F2L(k, pk), 0.0); fpos += F2L(k, pk); @@ -12574,7 +11140,7 @@ int InputReffer(char *extension, int setfps) if (raw2) fprintf(raw2, "\"%s\", %6ld, %6.1f, %6.1f, %6.1f\n", basename, -1, fneg, fpos, total); if (raw2) fclose(raw2); -//#else + //#else j = 0; i = 0; while ( i <= reffer_count && j <= commercial_count ) @@ -12583,32 +11149,22 @@ int InputReffer(char *extension, int setfps) if ( commercial[j].end_frame < reffer[i].start_frame ) { fprintf(raw, "Found %6ld %6ld Reference %6ld %6ld Difference %+6.1f %+6.1f\n", commercial[j].start_frame, commercial[j].end_frame, 0,0, F2L(commercial[j].end_frame, commercial[j].start_frame) , F2L(commercial[j].end_frame, commercial[j].start_frame)); -// fprintf(raw, "Found %6ld %6ld Not in reference\n", commercial[j].start_frame, commercial[j].end_frame); + // fprintf(raw, "Found %6ld %6ld Not in reference\n", commercial[j].start_frame, commercial[j].end_frame); j++; } else if ( commercial[j].start_frame > reffer[i].end_frame ) { fprintf(raw, "Found %6ld %6ld Reference %6ld %6ld Difference %+6.1f %+6.1f\n", 0, 0, reffer[i].start_frame, reffer[i].end_frame, -F2L(reffer[i].end_frame, reffer[i].start_frame) , -F2L(reffer[i].end_frame, reffer[i].start_frame)); -// fprintf(raw, "Not found %6ld %6ld\n", reffer[i].start_frame, reffer[i].end_frame); + // fprintf(raw, "Not found %6ld %6ld\n", reffer[i].start_frame, reffer[i].end_frame); i++; } else { if (abs(reffer[i].start_frame-commercial[j].start_frame) > 40 || - abs(reffer[i].end_frame-commercial[j].end_frame) > 40 ) + abs(reffer[i].end_frame-commercial[j].end_frame) > 40 ) { fprintf(raw, "Found %6ld %6ld Reference %6ld %6ld Difference %+6.1f %+6.1f\n", commercial[j].start_frame, commercial[j].end_frame, reffer[i].start_frame, reffer[i].end_frame, F2L(reffer[i].start_frame, commercial[j].start_frame) , F2L(commercial[j].end_frame , reffer[i].end_frame)); } - /* - if (abs(reffer[i].start_frame-commercial[j].start_frame) > 40 ) { - fprintf(raw, "Found %5ld %5ld Reference %5ld %5ld ", commercial[j].start_frame, commercial[j].end_frame, reffer[i].start_frame, reffer[i].end_frame); - fprintf(raw, "starts at %5ld instead of %5ld\n", commercial[j].start_frame, reffer[i].start_frame); - } - if (abs(reffer[i].end_frame-commercial[j].end_frame) > 40 ) { - fprintf(raw, "Found %5ld %5ld Reference %5ld %5ld ", commercial[j].start_frame, commercial[j].end_frame, reffer[i].start_frame, reffer[i].end_frame); - fprintf(raw, "ends at %5ld instead of %5ld\n", commercial[j].end_frame, reffer[i].end_frame); - } - */ i++; j++; } @@ -12616,16 +11172,13 @@ int InputReffer(char *extension, int setfps) while (j <= commercial_count) { fprintf(raw, "Found %6ld %6ld Reference %6ld %6ld Difference %+6.1f %+6.1f\n", commercial[j].start_frame, commercial[j].end_frame, 0,0, F2L(commercial[j].end_frame, commercial[j].start_frame) , F2L(commercial[j].end_frame, commercial[j].start_frame)); -// fprintf(raw, "Found %6ld %6ld Not in reference\n", commercial[j].start_frame, commercial[j].end_frame); j++; } while (i <= reffer_count) { fprintf(raw, "Found %6ld %6ld Reference %6ld %6ld Difference %+6.1f %+6.1f\n", 0, 0, reffer[i].start_frame, reffer[i].end_frame, -F2L(reffer[i].end_frame, reffer[i].start_frame) , -F2L(reffer[i].end_frame, reffer[i].start_frame)); -// fprintf(raw, "Not found %6ld %6ld\n", reffer[i].start_frame, reffer[i].end_frame); i++; } -//#endif for (i=0; i 99) t = t / 10.0; } -// Debug(1, "T = %f\n",t); + if (t > 0) fps = t * 1.00000000000001; if (strlen(line) > 94) @@ -12960,17 +11497,12 @@ void ProcessCSV(FILE *in_file) lineProcessed = false; InitializeFrameArray(frame_count); -// i, frame[i].brightness, frame[i].schange_percent*5, frame[i].logo_present, -// frame[i].uniform, frame[i].volume, frame[i].minY,frame[i].maxY,(int)((frame[i].ar_ratio)*100), -// (int)(frame[i].currentGoodEdge * 500), frame[i].isblack - frame[frame_count].minX = 0; frame[frame_count].maxX = 0; frame[frame_count].hasBright = 0; frame[frame_count].dimCount = 0; frame[frame_count].pts = (frame_count - 1) / fps; - // Split Line Apart while (line[i] != '\0' && i < (int)sizeof(line) && !lineProcessed) { @@ -12978,7 +11510,6 @@ void ProcessCSV(FILE *in_file) { split[x] = '\0'; - // printf("col = %i\t", col); switch (col) { case 0: @@ -13109,13 +11640,12 @@ void ProcessCSV(FILE *in_file) { if (i == 33368) i = i; -ccagain: + ccagain: if (dump_data_file && ccDataFrame == 0) { cont = fread(line,8,1,dump_data_file); line[8]=0; sscanf(line,"%7d:",&ccDataFrame); -// ccDataFrame = strtol(line,NULL,7); } if (dump_data_file ) { @@ -13128,7 +11658,6 @@ void ProcessCSV(FILE *in_file) break; line[4]=0; sscanf(line,"%4d",&ccDataLen); -// ccDataLen = strtol(line,NULL,4); cont = fread(ccData,ccDataLen,1, dump_data_file); if (!cont) break; @@ -13168,7 +11697,7 @@ void ProcessCSV(FILE *in_file) } else { -// frame[i].isblack &= C_b; + // frame[i].isblack &= C_b; } if (frame[i].isblack & C_b) i = i; @@ -13214,8 +11743,8 @@ void ProcessCSV(FILE *in_file) } if (i == 1) { -// if (frame[i].maxX == 0) -// videowidth = width = (int) ((frame[i].maxY - frame[i].minY) * frame[i].ar_ratio ); + // if (frame[i].maxX == 0) + // videowidth = width = (int) ((frame[i].maxY - frame[i].minY) * frame[i].ar_ratio ); ProcessARInfoInit(frame[i].minY, frame[i].maxY, frame[i].minX, frame[i].maxX); } else @@ -13232,17 +11761,6 @@ void ProcessCSV(FILE *in_file) if ((commDetectMethod & RESOLUTION_CHANGE)) { - /* not reliable!!!!!!!!!!!!!!!!!!!!! - frame[i].isblack &= ~C_r; - videowidth = width = frame[i].minX + frame[i].maxX; - height = frame[i].minY + frame[i].maxY; - - if ((old_width != 0 && abs(width-old_width) > 50) || (old_height != 0 && abs(height - old_height) > 50)) { - frame[i].isblack |= C_r; - } - old_width = width; - old_height = height; - */ } else frame[i].isblack &= ~C_r; @@ -13250,8 +11768,6 @@ void ProcessCSV(FILE *in_file) if (commDetectMethod & BLACK_FRAME) { - // if (frame[i].brightness <= max_avg_brightness && (non_uniformity == 0 || frame[i].uniform < non_uniformity)/* && frame[i].volume < max_volume */ && !(frame[i].isblack & C_b)) - // frame[i].isblack |= C_b; if ((frame[i].isblack & C_b) && frame[i].brightness > max_avg_brightness) frame[i].isblack &= ~C_b; @@ -13310,18 +11826,6 @@ void ProcessCSV(FILE *in_file) if (frame[i].isblack) { InsertBlackFrame(i,frame[i].brightness,frame[i].uniform,frame[i].volume, (int)frame[i].isblack); - - /* - j = i-volume_slip; - if (j < 0) j = 0; - k = i+volume_slip; - if (k>frame_count) k = frame_count; - for (x=j; x= 0) - if (black[black_count].volume > frame[x].volume) - black[black_count].volume = frame[x].volume; - // if (black[black_count].volume < max_volume) frame[i].volume = 1; - */ } if ((frame[i].schange_percent < 20) && (black[black_count - 1].frame != i)) @@ -13352,10 +11856,6 @@ void ProcessCSV(FILE *in_file) } if (lastLogoTest) frames_with_logo++; -// if (live_tv && !frame[i].isblack) { -// BuildCommListAsYouGo(); -// } - } framenum_real = frame_count; framesprocessed = frame_count; @@ -13378,8 +11878,6 @@ void ProcessCSV(FILE *in_file) LoadIniFile(); goto again; } - // printf(" Press Enter to close debug window\n"); -// gets(HomeDir); } exit(0); } @@ -13395,7 +11893,7 @@ void OutputCCBlock(long i) cc_block[i - 2].start_frame, cc_block[i - 2].end_frame, CCTypeToStr(cc_block[i - 2].type) - ); + ); } if (i > 0) @@ -13407,7 +11905,7 @@ void OutputCCBlock(long i) cc_block[i - 1].start_frame, cc_block[i - 1].end_frame, CCTypeToStr(cc_block[i - 1].type) - ); + ); } if (i <= 0) @@ -13419,26 +11917,11 @@ void OutputCCBlock(long i) cc_block[i].start_frame, cc_block[i].end_frame, CCTypeToStr(cc_block[i - 1].type) - ); + ); } } -/* -typedef struct -{ - long frame; - char name[40]; - int v_chip; - int duration; - int current; -} XDS_block_info; - -XDS_block_info* XDS_block = NULL; -long XDS_block_count = 0; -long max_XDS_block_count; -*/ - -Init_XDS_block() +void Init_XDS_block() { if(!XDS_block) { @@ -13460,7 +11943,7 @@ Init_XDS_block() } } -Add_XDS_block() +void Add_XDS_block() { if (XDS_block_count < max_XDS_block_count) { @@ -13477,14 +11960,14 @@ Add_XDS_block() unsigned char XDSbuffer[40][100]; int lastXDS = 0; - int firstXDS = 1; - int startXDS = 1; - int baseXDS = 0; +int firstXDS = 1; +int startXDS = 1; +int baseXDS = 0; - char *ratingSystem[4] = { "MPAA", "TPG", "CE", "CF" }; +char *ratingSystem[4] = { "MPAA", "TPG", "CE", "CF" }; #define MAXXDSBUFFER 1024 - void AddXDS(unsigned char hi, unsigned char lo) +void AddXDS(unsigned char hi, unsigned char lo) { static unsigned char XDSbuf[MAXXDSBUFFER]; static int c = 0; @@ -13585,7 +12068,6 @@ int lastXDS = 0; } else if (XDSbuf[1] == 0x02) { -// Debug(10, "XDS[%i]: Program Length\n", XDSbuf[2] & 0x38, XDSbuf[2] & 0x4f , XDSbuf[3] & 0x4f, XDSbuf[3] & 0xb0); Debug(10, "XDS[%i]: Program length %d:%d, elapsed %d:%d:%d.%d\n", framenum, XDSbuf[3] & 0x3f, XDSbuf[2] & 0x3f, XDSbuf[5] & 0x3f, XDSbuf[4] & 0x3f , XDSbuf[6] & 0x3f); if ( (XDSbuf[2] << 8) + XDSbuf[3] != XDS_block[XDS_block_count].duration) { @@ -13597,31 +12079,6 @@ int lastXDS = 0; Add_XDS_block(); XDS_block[XDS_block_count].position = (XDSbuf[5] << 8) + XDSbuf[4]; } - - - /* - 01155 uint length_min = xds_buf[2] & 0x3f; - 01156 uint length_hour = xds_buf[3] & 0x3f; - 01157 uint length_elapsed_min = 0; - 01158 uint length_elapsed_hour = 0; - 01159 uint length_elapsed_secs = 0; - 01160 if (xds_buf.size() > 6) - 01161 { - 01162 length_elapsed_min = xds_buf[4] & 0x3f; - 01163 length_elapsed_hour = xds_buf[5] & 0x3f; - 01164 } - 01165 if (xds_buf.size() > 8 && xds_buf[7] == 0x40) - 01166 length_elapsed_secs = xds_buf[6] & 0x3f; - 01167 - 01168 QString msg = QString("Program Length %1:%2%3 " - 01169 "Time in Show %4:%5%6.%7%8") - 01170 .arg(length_hour).arg(length_min / 10).arg(length_min % 10) - 01171 .arg(length_elapsed_hour) - 01172 .arg(length_elapsed_min / 10).arg(length_elapsed_min % 10) - 01173 .arg(length_elapsed_secs / 10).arg(length_elapsed_secs % 10); - 01174 - */ - } else if (XDSbuf[1] == 0x83) { @@ -13631,7 +12088,6 @@ int lastXDS = 0; strcpy(XDS_block[XDS_block_count].name, (const char*) &XDSbuf[2]); } Debug(10, "XDS[%i]: Program Name: %s\n", framenum, &XDSbuf[2]); -// XDS_block[XDS_block_count].name[0] = 0; } else if (XDSbuf[1] == 0x04) { @@ -13645,9 +12101,6 @@ int lastXDS = 0; Add_XDS_block(); XDS_block[XDS_block_count].v_chip = (XDSbuf[2] << 8) + XDSbuf[3]; } - -// XDS_block[XDS_block_count].v_chip = 0; - } else if (XDSbuf[1] == 0x86) { @@ -13700,7 +12153,7 @@ int lastXDS = 0; } else { -dumpname: + dumpname: for (i=0; i < 256; i++) { XDSbuf[i] &= 0x7f; @@ -13728,134 +12181,118 @@ void AddCC(int i) int hi,lo; unsigned char charmap[0x60] = - { - ' ', - '!', - '"', - '#', - '$', - '%', - '&', - '\'', - '(', - ')', - 'á', - '+', - ',', - '-', - '.', - '/', - '0', - '1', - '2', - '3', - '4', - '5', - '6', - '7', - '8', - '9', - ':', - ';', - '<', - '=', - '>', - '?', - '@', - 'A', - 'B', - 'C', - 'D', - 'E', - 'F', - 'G', - 'H', - 'I', - 'J', - 'K', - 'L', - 'M', - 'N', - 'O', - 'P', - 'Q', - 'R', - 'S', - 'T', - 'U', - 'V', - 'W', - 'X', - 'Y', - 'Z', - '[', - 'é', - ']', - 'í', - 'ó', - 'ú', - 'a', - 'b', - 'c', - 'd', - 'e', - 'f', - 'g', - 'h', - 'i', - 'j', - 'k', - 'l', - 'm', - 'n', - 'o', - 'p', - 'q', - 'r', - 's', - 't', - 'u', - 'v', - 'w', - 'x', - 'y', - 'z', - 'ç', - '÷', - 'N', - 'n', - '?' - }; + { + ' ', + '!', + '"', + '#', + '$', + '%', + '&', + '\'', + '(', + ')', + 'a', + '+', + ',', + '-', + '.', + '/', + '0', + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9', + ':', + ';', + '<', + '=', + '>', + '?', + '@', + 'A', + 'B', + 'C', + 'D', + 'E', + 'F', + 'G', + 'H', + 'I', + 'J', + 'K', + 'L', + 'M', + 'N', + 'O', + 'P', + 'Q', + 'R', + 'S', + 'T', + 'U', + 'V', + 'W', + 'X', + 'Y', + 'Z', + '[', + 'e', + ']', + 'i', + 'o', + 'u', + 'a', + 'b', + 'c', + 'd', + 'e', + 'f', + 'g', + 'h', + 'i', + 'j', + 'k', + 'l', + 'm', + 'n', + 'o', + 'p', + 'q', + 'r', + 's', + 't', + 'u', + 'v', + 'w', + 'x', + 'y', + 'z', + 'c', + '/', + 'N', + 'n', + '?' + }; cc.cc1[0] &= 0x7f; cc.cc1[1] &= 0x7f; if (cc.cc1[0] == 0 && cc.cc1[1] == 0) return; - current_frame++; - /* - if ((cc.cc1[0] != 0x14 && cc.cc1[0] < 0x20)) { - cc.cc1[0] = ' '; - cc.cc1[1] = 0; - } - */ - - hi = cc.cc1[0]; lo = cc.cc1[1]; - -// if (hi == ' ' && lo == 'B') -// hi = hi; - - if (hi>=0x18 && hi<=0x1f) hi=hi-8; switch (hi) { case 0x10: -// if (lo>=0x40 && lo<=0x5f) -// handle_pac (hi,lo,wb); break; case 0x11: if (lo>=0x20 && lo<=0x2f) @@ -13863,17 +12300,13 @@ void AddCC(int i) cc.cc1[0] = 0x20; cc.cc1[1] = 0x00; } -// handle_text_attr (hi,lo,wb); if (lo>=0x30 && lo<=0x3f) { cc.cc1[0] = 0x20; cc.cc1[1] = 0x00; -// wrote_to_screen=1; -// handle_double (hi,lo,wb); } if (lo>=0x40 && lo<=0x7f) { -// handle_pac (hi,lo,wb); cc.cc1[0] = 0x20; cc.cc1[1] = 0x00; } @@ -13884,39 +12317,17 @@ void AddCC(int i) { cc.cc1[0] = 0x20; cc.cc1[1] = 0x00; -// handle_extended (hi,lo,wb); -// wrote_to_screen=1; } -// if (lo>=0x40 && lo<=0x7f) -// handle_pac (hi,lo,wb); break; case 0x14: case 0x15: -// if (lo>=0x20 && lo<=0x2f) -// handle_command (hi,lo,wb); -// if (lo>=0x40 && lo<=0x7f) -// handle_pac (hi,lo,wb); break; case 0x16: -// if (lo>=0x40 && lo<=0x7f) -// handle_pac (hi,lo,wb); break; case 0x17: -// if (lo>=0x21 && lo<=0x22) -// handle_command (hi,lo,wb); -// if (lo>=0x2e && lo<=0x2f) -// handle_text_attr (hi,lo,wb); -// if (lo>=0x40 && lo<=0x7f) -// handle_pac (hi,lo,wb); break; } - - - - - - if ((cc.cc1[0] >= 0x20) && (cc.cc1[0] < 0x80)) { if ((current_cc_type == ROLLUP) || (current_cc_type == PAINTON)) @@ -13950,7 +12361,7 @@ void AddCC(int i) } if (((!isalpha(cc_text[cc_text_count].text[cc_text[cc_text_count].text_len - 1])) && (cc_text[cc_text_count].text_len > 200)) || - (cc_text[cc_text_count].text_len > 245)) + (cc_text[cc_text_count].text_len > 245)) { cc_text[cc_text_count].end_frame = current_frame - 1; cc_text_count++; @@ -14109,7 +12520,7 @@ void AddCC(int i) current_frame, cc_in_memory, cc_on_screen - ); + ); cc_text[cc_text_count].end_frame = current_frame - 1; cc_text_count++; InitializeCCTextArray(cc_text_count); @@ -14288,7 +12699,7 @@ void ProcessCCData(void) AddCC(i/2); } prevccDataLen = 0; -// offset += 6; + // offset += 6; cctype = ccData[offset++] & 0x7f; cctype = ccData[offset++] & 0x7f; if (ccData[offset] & 0x7f) @@ -14299,7 +12710,7 @@ void ProcessCCData(void) ccDataLen = ccDataLen; cctype = ccData[offset++] & 0x7f; cctype = ccData[offset++] & 0x7f; -// + // cctype = ccData[offset++]; offset++; prevccDataLen = 0; @@ -14364,8 +12775,8 @@ void ProcessCCData(void) continue; cctype = (ccData[(i * 3) + offset] & 3); -// cc.cc1[0] = CheckOddParity(ccData[(i * 3) + offset + 1]) ? ccData[(i * 3) + offset + 1] & 0x7f : 0x00; -// cc.cc1[1] = CheckOddParity(ccData[(i * 3) + offset + 2]) ? ccData[(i * 3) + offset + 2] & 0x7f : 0x00; + // cc.cc1[0] = CheckOddParity(ccData[(i * 3) + offset + 1]) ? ccData[(i * 3) + offset + 1] & 0x7f : 0x00; + // cc.cc1[1] = CheckOddParity(ccData[(i * 3) + offset + 2]) ? ccData[(i * 3) + offset + 2] & 0x7f : 0x00; cc.cc1[0] = ccData[(i * 3) + offset + 1] & 0x7f; cc.cc1[1] = ccData[(i * 3) + offset + 2] & 0x7f; @@ -14382,10 +12793,7 @@ void ProcessCCData(void) continue; if ( cctype == 0 /* || cctype == 1 */ ) { -// cc.cc1[0] = ccData[(i * 3) + offset + 1] & 0x7f; -// cc.cc1[1] = ccData[(i * 3) + offset + 2] & 0x7f; AddCC(i); - } else { @@ -14393,20 +12801,6 @@ void ProcessCCData(void) cc.cc1[1] = 0; } } - /* - if (is_dish) { - - if (cctype == 2 || cctype == 4) { - cc.cc1[0] = ccData[(i * 3) + offset + 1] & 0x7f; - cc.cc1[1] = ccData[(i * 3) + offset + 2] & 0x7f; - offset = offset - 1; - AddCC(i); - - } else - continue; - - } - */ } } } @@ -14452,8 +12846,8 @@ void AddNewCCBlock(long current_frame, int type, bool cc_on_screen, bool cc_in_m if (cc_block_count > 1) { if ((F2L(cc_block[cc_block_count - 1].end_frame, cc_block[cc_block_count - 1].start_frame) < 1.0) && - (cc_block[cc_block_count].type == cc_block[cc_block_count - 2].type) && - (cc_block[cc_block_count].type != NONE)) + (cc_block[cc_block_count].type == cc_block[cc_block_count - 2].type) && + (cc_block[cc_block_count].type != NONE)) { cc_block_count -= 2; cc_block[cc_block_count].end_frame = -1; @@ -14539,9 +12933,9 @@ int DetermineCCTypeForBlock(long start, long end) if (i > 1) { if ((cc_block[i - 2].type == PAINTON) && - (cc_block[i - 1].type == NONE) && - (F2L(cc_block[i - 1].end_frame, cc_block[i - 1].start_frame) <= 1.5) && - (cc_block[i].type == POPON)) + (cc_block[i - 1].type == NONE) && + (F2L(cc_block[i - 1].end_frame, cc_block[i - 1].start_frame) <= 1.5) && + (cc_block[i].type == POPON)) { type = COMMERCIAL; break; @@ -14595,7 +12989,7 @@ void SetARofBlocks(void) sumAR = 0.0; frameCount = 0; // To prevent divide by zero error for (j = cblock[i].f_start + cblock[i].b_head; - j < cblock[i].f_end - (int) cblock[i].b_tail; j++) + j < cblock[i].f_end - (int) cblock[i].b_tail; j++) { if ( k < ar_block_count && j >= ar_block[k].end ) k++; @@ -14729,8 +13123,8 @@ void BuildCommListAsYouGo(void) local_blacklevel = max_avg_brightness; if ((black[black_count-1].brightness <= local_blacklevel) && - /*(black[black_count-1].frame == framenum_real) &&*/ - (framenum_real > lastFrame)) + /*(black[black_count-1].frame == framenum_real) &&*/ + (framenum_real > lastFrame)) { lastFrameCommCalculated = framenum_real; @@ -14768,8 +13162,8 @@ void BuildCommListAsYouGo(void) } oldbreak = commercials > 0 && ((onTheFlyBlackFrame[i] - c_end[commercials - 1]) < 10 * fps); if (gap_length > max_commercialbreak * fps || - (!oldbreak && gap_length > max_commercial_size * fps) || - (oldbreak && (onTheFlyBlackFrame[x] - c_end[commercials - 1] > max_commercial_size * fps))) + (!oldbreak && gap_length > max_commercial_size * fps) || + (oldbreak && (onTheFlyBlackFrame[x] - c_end[commercials - 1] > max_commercial_size * fps))) { break; } @@ -14792,7 +13186,7 @@ void BuildCommListAsYouGo(void) onTheFlyBlackFrame[x], c_start[commercials - 1], c_end[commercials - 1] - ); + ); } else if (onTheFlyBlackFrame[x] > c_end[commercials - 1] + fps) { @@ -14805,7 +13199,7 @@ void BuildCommListAsYouGo(void) onTheFlyBlackFrame[x], (onTheFlyBlackFrame[x] - onTheFlyBlackFrame[i]) / fps, (c_end[commercials - 1] - c_start[commercials - 1]) / fps - ); + ); } } else @@ -14817,7 +13211,7 @@ void BuildCommListAsYouGo(void) "Logo detected between frames %i and %i. Skipping to next i.\n", onTheFlyBlackFrame[i], onTheFlyBlackFrame[x] - ); + ); i = x - 1; /*Gil*/ break; } @@ -14829,7 +13223,7 @@ void BuildCommListAsYouGo(void) onTheFlyBlackFrame[i], onTheFlyBlackFrame[x], ((onTheFlyBlackFrame[x] - onTheFlyBlackFrame[i]) / fps) - ); + ); ic_start[commercials] = i; ic_end[commercials] = x; c_start[commercials] = onTheFlyBlackFrame[i]; @@ -14841,7 +13235,7 @@ void BuildCommListAsYouGo(void) c_start[commercials - 1], c_end[commercials - 1], (int)((c_end[commercials - 1] - c_start[commercials - 1]) / fps) - ); + ); } } i = x - 1; @@ -14868,7 +13262,7 @@ void BuildCommListAsYouGo(void) exit(103); } } -// fprintf(out_file, "FILE PROCESSING COMPLETE %6li FRAMES AT %4i\n-------------------\n",frame_count-1, (int)(fps*100)); + // fprintf(out_file, "FILE PROCESSING COMPLETE %6li FRAMES AT %4i\n-------------------\n",frame_count-1, (int)(fps*100)); } if (output_edl) { @@ -14892,7 +13286,6 @@ void BuildCommListAsYouGo(void) dvrmstb_file = myfopen(filename, "w"); if (dvrmstb_file) { - // fclose(dvrmstb_file); fprintf(dvrmstb_file, "\n\n"); } else @@ -14996,7 +13389,7 @@ void BuildCommListAsYouGo(void) else fprintf(incommercial_file, "0\n"); fclose(incommercial_file); -skipit: + skipit: ; } @@ -15031,7 +13424,7 @@ static struct } volumes[MAX_SAVED_VOLUMES]; static int max_fill = 0; - void SaveVolume (int f,int v) +void SaveVolume (int f,int v) { int i; for (i = 0; i < MAX_SAVED_VOLUMES; i++) @@ -15074,7 +13467,7 @@ void set_frame_volume(unsigned int f, int volume) int act_framenum; if (!initialized) return; -// ascr += 1; + // ascr += 1; act_framenum = f; if (act_framenum > 0) @@ -15098,12 +13491,8 @@ void set_frame_volume(unsigned int f, int volume) if (black[i].brightness > 0) black[i].volume = volume; // Set the zero above to 5 if you do not want the volume to be updated for uniform frames etc. } -// audio_framenum++; -// ascr += 1; } - - FILE *dump_audio_file; void dump_audio_start() @@ -15123,7 +13512,7 @@ void dump_audio (char *start, char *end) if (!dump_audio_file) return; fwrite(start, end-start, 1, dump_audio_file); -// fclose(dump_audio_file); + // fclose(dump_audio_file); } FILE *dump_video_file; @@ -15143,7 +13532,7 @@ void dump_video (char *start, char *end) if (!output_demux) return; if (!dump_video_file) return; fwrite(start, end-start, 1, dump_video_file); -// fclose(dump_video_file); + // fclose(dump_video_file); } void close_dump(void) @@ -15179,7 +13568,4 @@ void dump_data(char *start, int length) for (i=0; i&2 + exit 1 +fi + +if ! test -f "$1"; then + echo ".ini file $1 does not exists." + exit 1 +fi + +if ! test -f "$2"; then + echo "TS file $2 does not exists." + exit 1 +fi + +COMSKIP=/usr/local/bin/comskip +FFMPEG=ffmpeg +OPTIONS=--csvout +INIFILE="$1" +TS_FILE="$2" + +export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib +${COMSKIP} ${OPTIONS} --ini="${INIFILE}" "${TS_FILE}" + +FEXT="${TS_FILE##*.}" +FILE_NAME="$(basename "${TS_FILE}" "${FEXT}")" + +if ! test -f "`pwd`/${FILE_NAME}vdr"; then + echo ".vdr file does not exists...exit" 1>&2 + exit 1 +fi + +# +# split TS file and concat by ffmpeg +# +VDR_FILE="`pwd`/${FILE_NAME}vdr" +LINE_NO=1 + +# 'CM' begin centisec time +BEGIN_CSEC="" +# 'CM' end centisec time +_END__CSEC="" + +# main knitting begin centisec time array +BEGIN_CSEC_ARRAY=() +# main knitting end centisec time array +_END__CSEC_ARRAY=() + +_IFS="${IFS}" +IFS=":. " +exec 9<"${VDR_FILE}" +# ::. (start|end) +while read -u9 hour min sec centisec ignore; +do + if test ${LINE_NO} = 1; then + # skip first line + LINE_NO=`expr ${LINE_NO} + 1` + continue + fi + + # calculate centisecond time + _CSEC=`expr \( \( ${hour} \* 60 + ${min} \) \* 60 + ${sec} \) \* 100 + ${centisec}` + #echo "DEBUG: $hour:$min:$sec.$centisec -> ${_CSEC}" + + if `expr \( ${LINE_NO} % 2 \) = 1 > /dev/null`; then + _END__CSEC_ARRAY+=(${_CSEC}) + else + BEGIN_CSEC_ARRAY+=(${_CSEC}) + fi + LINE_NO=`expr ${LINE_NO} + 1` +done +IFS="${_IFS}" +exec 9<&- + +if test ${#_END__CSEC_ARRAY[@]} -eq 0; then + echo "It seems no commercials is found." + exit 2 +fi + +i=0 +CUT_FILE_LIST=() + +for _END__CSEC in ${_END__CSEC_ARRAY[@]}; do + # _END__CSEC and BEGIN_CSEC is centisec!! + BEGIN_CSEC=${BEGIN_CSEC_ARRAY[${i}]} + # calculate original time for beginning + BEGIN_SEC=`expr ${BEGIN_CSEC} / 100` + BEGIN_CENTISEC=`expr ${BEGIN_CSEC} % 100` + BEGIN_TIME=`printf '%d.%02d' ${BEGIN_SEC} ${BEGIN_CENTISEC}` + + let i++ + FILE_PARTS=${i} + CUT_FILE_LIST+=(`pwd`/"${FILE_NAME}-${FILE_PARTS}.ts") + + DIFF_TIME=`expr ${_END__CSEC} - ${BEGIN_CSEC}` + DIFF_SEC=`expr ${DIFF_TIME} / 100` + DIFF_CENTISEC=`expr ${DIFF_TIME} % 100` + PLAY_TIME=`printf '%d.%02d' ${DIFF_SEC} ${DIFF_CENTISEC}` + #echo "DEBUG: $_END__CSEC - $BEGIN_CSEC = ${DIFF_SEC}.${DIFF_CENTISEC}" + #mkfifo "$(pwd)/${FILE_NAME}-${FILE_PARTS}.ts" + # ffmpeg -i -ss -t + echo "${FFMPEG} -y -i ${TS_FILE} -c copy -ss ${BEGIN_TIME} -t ${PLAY_TIME} -sn `pwd`/${FILE_NAME}-${FILE_PARTS}.ts" + # if you use with mkfifo, run FFMPEG command IN BACKGROUND (just append &) + ${FFMPEG} -y -i "${TS_FILE}" -c copy -ss ${BEGIN_TIME} -t ${PLAY_TIME} -sn `pwd`/"${FILE_NAME}-${FILE_PARTS}.ts" +done + +# +# concat CM cut files +# +FFMPEG_CONCAT_STR="concat:" +i=0 +for FILE in ${CUT_FILE_LIST[@]}; do + if test ${i} != 0; then + FFMPEG_CONCAT_STR="${FFMPEG_CONCAT_STR}|" + fi + FFMPEG_CONCAT_STR="${FFMPEG_CONCAT_STR}${CUT_FILE_LIST[${i}]}" + let i++ +done + +OUTPUT_FILE="`pwd`/CUT-${FILE_NAME}ts" +echo "${FFMPEG} -i \"${FFMPEG_CONCAT_STR}\" -c copy ${OUTPUT_FILE}" +${FFMPEG} -i "${FFMPEG_CONCAT_STR}" -c copy "${OUTPUT_FILE}" diff --git a/mpeg2dec.c b/mpeg2dec.c index 424da23..009d61e 100644 --- a/mpeg2dec.c +++ b/mpeg2dec.c @@ -25,45 +25,40 @@ #include #include #include -#include +#include +#else +#include #endif -//#include "config.h" - #define SELFTEST -#include #include #include #include #include #include -#ifdef HAVE_IO_H #include -#endif -#ifdef LIBVO_SDL -#include -#endif #include +#include "comskip.h" +#ifdef __FreeBSD__ +#include +#include +#endif int pass = 0; double test_pts = 0.0; - - #define inline __inline #include #include #include - #include int av_log_level; #undef AV_TIME_BASE_Q static AVRational AV_TIME_BASE_Q = {1, AV_TIME_BASE}; - #define SDL_AUDIO_BUFFER_SIZE 1024 #define MAX_AUDIOQ_SIZE (5 * 16 * 1024) #define MAX_VIDEOQ_SIZE (5 * 256 * 1024) @@ -77,7 +72,6 @@ static AVRational AV_TIME_BASE_Q = {1, AV_TIME_BASE}; #define VIDEO_PICTURE_QUEUE_SIZE 1 #define DEFAULT_AV_SYNC_TYPE AV_SYNC_ADUIO_MASTER - typedef struct VideoPicture { int width, height; /* source height & width */ @@ -89,10 +83,7 @@ typedef struct VideoState { AVFormatContext *pFormatCtx; int videoStream, audioStream, subtitleStream; - int av_sync_type; -// double external_clock; /* external clock base */ -// int64_t external_clock_time; int seek_req; double seek_pts; int seek_flags; @@ -106,8 +97,6 @@ typedef struct VideoState unsigned int audio_buf_index; AVPacket audio_pkt; AVPacket audio_pkt_temp; -// uint8_t *audio_pkt_data; -// int audio_pkt_size; int audio_hw_buf_size; double audio_diff_cum; /* used for AV difference average computation */ double audio_diff_avg_coef; @@ -144,28 +133,19 @@ enum VideoState *global_video_state; AVPacket flush_pkt; - __int64 pev_best_effort_timestamp = 0; - int video_stream_index = -1; int audio_stream_index = -1; int width, height; int have_frame_rate ; int stream_index; - __int64 best_effort_timestamp; - - - #define USE_ASF 1 -//#include "mpeg2convert.h" -#include "comskip.h" - extern int coding_type; #ifdef _WIN32 @@ -184,8 +164,6 @@ static FILE * in_file; static FILE * sample_file; static FILE * timing_file = 0; - - extern int thread_count; int is_AC3; int AC3_rate; @@ -224,14 +202,10 @@ int initial_apts_set = 0; //int bitrate; int muxrate,byterate=10000; #define PTS_FRAME (double)(1.0 / get_fps()) -//#define PTS_FRAME (int) (90000 / get_fps()) #define SAMPLE_TO_FRAME 2.8125 -//#define SAMPLE_TO_FRAME (90000.0/(get_fps() * 1000.0)) - -//#define BYTERATE ((int)(21400 * 25 / get_fps())) - #define FSEEK _fseeki64 #define FTELL _ftelli64 + // The following two functions are undocumented and not included in any public header, // so we need to declare them ourselves extern int _fseeki64(FILE *, __int64, int); @@ -250,7 +224,7 @@ FILE *myfopen(const char * f, char * m); #define DUMP_OPEN if (output_timing) { sprintf(tempstring, "%s.timing.csv", basename); timing_file = myfopen(tempstring, "w"); DUMP_HEADER } #define DUMP_HEADER if (timing_file) fprintf(timing_file, "type ,dts ,pts ,clock ,delta ,offset\n"); #define DUMP_TIMING(T, D, P, C) if (timing_file && !csStepping && !csJumping && !csStartJump) fprintf(timing_file, "%7s, %12.3f,%12.3f, %12.3f, %12.3f, %12.3f,\n", \ - T, (double) (D)/frame_delay, (double) (P)/frame_delay, (double) (C)/frame_delay, ((double) (P) - (double) (C))/frame_delay, pts_offset/frame_delay ); + T, (double) (D)/frame_delay, (double) (P)/frame_delay, (double) (C)/frame_delay, ((double) (P) - (double) (C))/frame_delay, pts_offset/frame_delay ); #define DUMP_CLOSE if (timing_file) { fclose(timing_file); timing_file = NULL; } @@ -269,12 +243,13 @@ static int dump_seek = 1; // Set to 1 to dump the seeking process static int dump_seek = 0; // Set to 1 to dump the seeking process #endif -#include -//#include - - +#ifdef _WIN32 struct _stati64 instat; #define filesize instat.st_size +#else +struct stat instat; +#define filesize instat.st_size +#endif extern int frame_count; int framenum; @@ -466,14 +441,14 @@ void sound_to_frames(VideoState *is, short *b, int s, int format) apts = base_apts; delta = (base_apts - is->video_clock) * get_fps(); -// delta = (__int64)(apts/PTS_FRAME) - (__int64)(pts/PTS_FRAME); + // delta = (__int64)(apts/PTS_FRAME) - (__int64)(pts/PTS_FRAME); if (-max_internal_repair_size < delta && delta < max_internal_repair_size && abs( sound_frame_counter - delta - framenum) > 20 ) { Debug(1, "Audio PTS jumped %d frames at frame %d\n", -sound_frame_counter + delta + framenum, framenum); sound_frame_counter = delta + framenum; } -// DUMP_TIMING("a frame", apts, is->video_clock); + // DUMP_TIMING("a frame", apts, is->video_clock); set_frame_volume((demux_asf?ms_audio_delay:0)+sound_frame_counter++, volume); base_apts += (double)s_per_frame/(double)n; @@ -511,12 +486,12 @@ void audio_packet_process(VideoState *is, AVPacket *pkt) pkt_temp->data = pkt->data; pkt_temp->size = pkt->size; /* Try to align on packet boundary as some demuxers don't do that, in particular dvr-ms - if (is->audio_st->codec->codec_id == CODEC_ID_MP1) { - while (pkt_temp->size > 2 && (pkt_temp->data[0] != 0xff || pkt_temp->data[1] != 0xe0) ) { - pkt_temp->data++; - pkt_temp->size--; - } - } + if (is->audio_st->codec->codec_id == CODEC_ID_MP1) { + while (pkt_temp->size > 2 && (pkt_temp->data[0] != 0xff || pkt_temp->data[1] != 0xe0) ) { + pkt_temp->data++; + pkt_temp->size--; + } + } */ n = (is->audio_st->codec->bits_per_coded_sample / 8) * is->audio_st->codec->channels * is->audio_st->codec->sample_rate; @@ -533,7 +508,7 @@ void audio_packet_process(VideoState *is, AVPacket *pkt) } pts = pts + pts_offset; -// Debug(0 ,"apst[%3d] = %12.3f\n", framenum, pts); + // Debug(0 ,"apst[%3d] = %12.3f\n", framenum, pts); if (pts != 0) { if (is->audio_clock != 0) @@ -541,26 +516,26 @@ void audio_packet_process(VideoState *is, AVPacket *pkt) if ((pts - is->audio_clock) < -0.999 || (pts - is->audio_clock) > max_repair_size/get_fps() ) { Debug(1 ,"Audio jumped by %6.3f at frame %d\n", (pts - is->audio_clock), framenum); -// DUMP_TIMING("a set", pts, is->audio_clock); + // DUMP_TIMING("a set", pts, is->audio_clock); is->audio_clock = pts; } else { -// DUMP_TIMING("a free", pts, is->audio_clock); + // DUMP_TIMING("a free", pts, is->audio_clock); // Do nothing } } else { -// DUMP_TIMING("ajmpset", pts, is->audio_clock); + // DUMP_TIMING("ajmpset", pts, is->audio_clock); is->audio_clock = pts; } } else { /* if we aren't given a pts, set it to the clock */ -// DUMP_TIMING("a tick", pts, is->audio_clock); + // DUMP_TIMING("a tick", pts, is->audio_clock); pts = is->audio_clock; } #else @@ -612,14 +587,14 @@ void audio_packet_process(VideoState *is, AVPacket *pkt) dec_channel_layout = (is->frame->channel_layout && is->frame->channels == av_get_channel_layout_nb_channels(is->frame->channel_layout)) ? is->frame->channel_layout : av_get_default_channel_layout(is->frame->channels); -// fprintf(stderr, "Audio %f\n", is->audio_clock); + // fprintf(stderr, "Audio %f\n", is->audio_clock); if (data_size > 0) { sound_to_frames(is, (short *)is->frame->data[0], data_size / av_get_bytes_per_sample(is->frame->format), is->frame->format); } is->audio_clock += (double)data_size / - (is->frame->channels * is->frame->sample_rate * av_get_bytes_per_sample(is->frame->format)); + (is->frame->channels * is->frame->sample_rate * av_get_bytes_per_sample(is->frame->format)); } } @@ -716,13 +691,12 @@ char field_t; void SetField(char t) { field_t = t; -// printf(" %c", t); } static void ResetInputFile() { - global_video_state->seek_req = TRUE; + global_video_state->seek_req = true; global_video_state->seek_pos = 0; global_video_state->seek_pts = 0.0; pev_best_effort_timestamp = 0; @@ -731,7 +705,6 @@ static void ResetInputFile() if (output_srt || output_smi) CEW_reinit(); #endif framenum = 0; -// frame_count = 0; sound_frame_counter = 0; initial_pts = 0; initial_pts_set = 0; @@ -739,10 +712,6 @@ static void ResetInputFile() initial_apts = 0; audio_samples = 0; best_effort_timestamp = 0; -#ifndef _DEBUG -// DUMP_CLOSE -// DUMP_OPEN -#endif } @@ -752,7 +721,7 @@ int SubmitFrame(AVStream *video_st, AVFrame *pFrame , double pts) int changed = 0; AVCodecContext *pCodecCtx = video_st->codec; -// bitrate = pFrame->bit_rate; + // bitrate = pFrame->bit_rate; if (pFrame->linesize[0] > 2000 || pFrame->height > 1200 || pFrame->linesize[0] < 100 || pFrame->height < 100) { // printf("Panic: illegal height, width or frame period\n"); @@ -824,7 +793,7 @@ Set_seek(VideoState *is, double pts, double length) is->seek_flags = AVSEEK_FLAG_ANY; is->seek_flags = AVSEEK_FLAG_BACKWARD; - is->seek_req = TRUE; + is->seek_req = true; if (is->duration <= 0) { uint64_t size = avio_size(ic->pb); @@ -864,7 +833,7 @@ void DecodeOnePicture(FILE * f, double pts, double length) best_effort_timestamp = 0; pts_offset = 0.0; -// Debug ( 5, "Seek to %f\n", pts); + // Debug ( 5, "Seek to %f\n", pts); frame_ptr = NULL; packet = &(is->audio_pkt); @@ -930,19 +899,19 @@ void DecodeOnePicture(FILE * f, double pts, double length) av_free_packet(packet); break; } -/* - double frame_delay = av_q2d(is->video_st->codec->time_base)* is->video_st->codec->ticks_per_frame; // <------------------------ frame delay is the time in seconds till the next frame - if (is->video_clock - is->seek_pts > -frame_delay / 2.0) - { - av_free_packet(packet); - break; - } - if (is->video_clock + (pack_duration * av_q2d(is->video_st->time_base)) >= is->seek_pts) - { - av_free_packet(packet); - break; - } - */ + /* + double frame_delay = av_q2d(is->video_st->codec->time_base)* is->video_st->codec->ticks_per_frame; // <------------------------ frame delay is the time in seconds till the next frame + if (is->video_clock - is->seek_pts > -frame_delay / 2.0) + { + av_free_packet(packet); + break; + } + if (is->video_clock + (pack_duration * av_q2d(is->video_st->time_base)) >= is->seek_pts) + { + av_free_packet(packet); + break; + } + */ } } else if(packet->stream_index == is->audioStream) @@ -1024,9 +993,9 @@ int video_packet_process(VideoState *is,AVPacket *packet) pev_best_effort_timestamp = best_effort_timestamp; -// best_effort_timestamp = *(__int64 *)av_opt_ptr(avcodec_get_frame_class(), is->pFrame, "best_effort_timestamp"); + // best_effort_timestamp = *(__int64 *)av_opt_ptr(avcodec_get_frame_class(), is->pFrame, "best_effort_timestamp"); best_effort_timestamp = av_frame_get_best_effort_timestamp(is->pFrame); -// best_effort_timestamp = is->pFrame->pkt_pts; + // best_effort_timestamp = is->pFrame->pkt_pts; calculated_delay = (best_effort_timestamp - pev_best_effort_timestamp) * av_q2d(is->video_st->time_base); @@ -1051,7 +1020,7 @@ int video_packet_process(VideoState *is,AVPacket *packet) } dts = av_q2d(is->video_st->time_base)* ( is->pFrame->pkt_dts - (is->video_st->start_time != AV_NOPTS_VALUE ? is->video_st->start_time : 0)) ; -// Debug(0 ,"pst[%3d] = %12.3f, inter = %d, rep = %d, ticks = %d\n", framenum, pts/frame_delay, is->pFrame->interlaced_frame, is->pFrame->repeat_pict, is->video_st->codec->ticks_per_frame); + // Debug(0 ,"pst[%3d] = %12.3f, inter = %d, rep = %d, ticks = %d\n", framenum, pts/frame_delay, is->pFrame->interlaced_frame, is->pFrame->repeat_pict, is->video_st->codec->ticks_per_frame); pts = real_pts + pts_offset; if(pts != 0) @@ -1062,7 +1031,7 @@ int video_packet_process(VideoState *is,AVPacket *packet) if ((pts - is->video_clock)/frame_delay < -10 || (pts - is->video_clock)/frame_delay > max_repair_size ) { if (!reviewing) Debug(1 ,"Video jumped by %6.1f at frame %d, inter = %d, rep = %d, ticks = %d\n", - (pts - is->video_clock)/frame_delay, framenum, is->pFrame->interlaced_frame, is->pFrame->repeat_pict, is->video_st->codec->ticks_per_frame); + (pts - is->video_clock)/frame_delay, framenum, is->pFrame->interlaced_frame, is->pFrame->repeat_pict, is->video_st->codec->ticks_per_frame); // Calculate offset for jump pts_offset = is->video_clock - real_pts/* set to mid of free window */; pts = real_pts + pts_offset; @@ -1072,7 +1041,7 @@ int video_packet_process(VideoState *is,AVPacket *packet) else if ((pts - is->video_clock)/frame_delay > 0.99 ) { if (!reviewing) Debug(1 ,"Video jumped by %6.1f frames at frame %d, repairing timeline\n", - (pts - is->video_clock)/frame_delay, framenum); + (pts - is->video_clock)/frame_delay, framenum); summed_repeat += is->video_st->codec->ticks_per_frame *(int) ((pts - is->video_clock)/frame_delay ); // is->video_clock = pts; DUMP_TIMING("vfollow", real_pts, pts, is->video_clock); @@ -1122,7 +1091,7 @@ int video_packet_process(VideoState *is,AVPacket *packet) is->seek_pos = 0; goto quit; } -// if (selftest == 4) exit(1); + // if (selftest == 4) exit(1); } /* update the video clock */ is->video_clock += frame_delay; @@ -1175,13 +1144,13 @@ int stream_component_open(VideoState *is, int stream_index) codecCtx = pFormatCtx->streams[stream_index]->codec; /* - if (codecCtx->codec_type == AVMEDIA_TYPE_AUDIO) { - if (codecCtx->channels > 0) { - codecCtx->request_channels = FFMIN(2, codecCtx->channels); - } else { - codecCtx->request_channels = 2; - } - } + if (codecCtx->codec_type == AVMEDIA_TYPE_AUDIO) { + if (codecCtx->channels > 0) { + codecCtx->request_channels = FFMIN(2, codecCtx->channels); + } else { + codecCtx->request_channels = 2; + } + } */ if (codecCtx->codec_type == AVMEDIA_TYPE_VIDEO) @@ -1205,14 +1174,14 @@ int stream_component_open(VideoState *is, int stream_index) #ifdef DONATOR codecCtx->lowres = lowres; #endif -// /* if(lowres) */ codecCtx->flags |= CODEC_FLAG_EMU_EDGE; + // /* if(lowres) */ codecCtx->flags |= CODEC_FLAG_EMU_EDGE; } -// codecCtx->flags2 |= CODEC_FLAG2_FAST; + // codecCtx->flags2 |= CODEC_FLAG2_FAST; if (codecCtx->codec_id != CODEC_ID_MPEG1VIDEO) #ifdef DONATOR codecCtx->thread_count= thread_count; #else - codecCtx->thread_count= 1; + codecCtx->thread_count= 1; #endif } @@ -1237,14 +1206,14 @@ int stream_component_open(VideoState *is, int stream_index) case AVMEDIA_TYPE_AUDIO: is->audioStream = stream_index; is->audio_st = pFormatCtx->streams[stream_index]; -// is->audio_buf_size = 0; -// is->audio_buf_index = 0; + // is->audio_buf_size = 0; + // is->audio_buf_index = 0; /* averaging filter for audio sync */ -// is->audio_diff_avg_coef = exp(log(0.01 / AUDIO_DIFF_AVG_NB)); -// is->audio_diff_avg_count = 0; + // is->audio_diff_avg_coef = exp(log(0.01 / AUDIO_DIFF_AVG_NB)); + // is->audio_diff_avg_count = 0; /* Correct audio only if larger error than this */ -// is->audio_diff_threshold = 2.0 * SDL_AUDIO_BUFFER_SIZE / codecCtx->sample_rate; + // is->audio_diff_threshold = 2.0 * SDL_AUDIO_BUFFER_SIZE / codecCtx->sample_rate; if (demux_pid) selected_audio_pid = is->audio_st->id; @@ -1255,9 +1224,9 @@ int stream_component_open(VideoState *is, int stream_index) is->videoStream = stream_index; is->video_st = pFormatCtx->streams[stream_index]; -// is->frame_timer = (double)av_gettime() / 1000000.0; -// is->frame_last_delay = 40e-3; -// is->video_current_pts_time = av_gettime(); + // is->frame_timer = (double)av_gettime() / 1000000.0; + // is->frame_last_delay = 40e-3; + // is->video_current_pts_time = av_gettime(); is->pFrame = avcodec_alloc_frame(); codecCtx->flags |= CODEC_FLAG_GRAY; @@ -1286,39 +1255,39 @@ int stream_component_open(VideoState *is, int stream_index) #ifdef DONATOR codecCtx->thread_count= thread_count; #else - codecCtx->thread_count= 1; + codecCtx->thread_count= 1; #endif if (codecCtx->codec_id == CODEC_ID_MPEG1VIDEO) is->video_st->codec->ticks_per_frame = 1; if (demux_pid) selected_video_pid = is->video_st->id; /* - MPEG - if( (codecCtx->skip_frame >= AVDISCARD_NONREF && s2->pict_type==FF_B_TYPE) - ||(codecCtx->skip_frame >= AVDISCARD_NONKEY && s2->pict_type!=FF_I_TYPE) - || codecCtx->skip_frame >= AVDISCARD_ALL) - - - if( (s->avctx->skip_idct >= AVDISCARD_NONREF && s->pict_type == FF_B_TYPE) - ||(codecCtx->skip_idct >= AVDISCARD_NONKEY && s->pict_type != FF_I_TYPE) - || s->avctx->skip_idct >= AVDISCARD_ALL) - h.264 - if( s->codecCtx->skip_loop_filter >= AVDISCARD_ALL - ||(s->codecCtx->skip_loop_filter >= AVDISCARD_NONKEY && h->slice_type_nos != FF_I_TYPE) - ||(s->codecCtx->skip_loop_filter >= AVDISCARD_BIDIR && h->slice_type_nos == FF_B_TYPE) - ||(s->codecCtx->skip_loop_filter >= AVDISCARD_NONREF && h->nal_ref_idc == 0)) - - Both - if( (codecCtx->skip_frame >= AVDISCARD_NONREF && s2->pict_type==FF_B_TYPE) - ||(codecCtx->skip_frame >= AVDISCARD_NONKEY && s2->pict_type!=FF_I_TYPE) - || codecCtx->skip_frame >= AVDISCARD_ALL) - break; + MPEG + if( (codecCtx->skip_frame >= AVDISCARD_NONREF && s2->pict_type==FF_B_TYPE) + ||(codecCtx->skip_frame >= AVDISCARD_NONKEY && s2->pict_type!=FF_I_TYPE) + || codecCtx->skip_frame >= AVDISCARD_ALL) + + + if( (s->avctx->skip_idct >= AVDISCARD_NONREF && s->pict_type == FF_B_TYPE) + ||(codecCtx->skip_idct >= AVDISCARD_NONKEY && s->pict_type != FF_I_TYPE) + || s->avctx->skip_idct >= AVDISCARD_ALL) + h.264 + if( s->codecCtx->skip_loop_filter >= AVDISCARD_ALL + ||(s->codecCtx->skip_loop_filter >= AVDISCARD_NONKEY && h->slice_type_nos != FF_I_TYPE) + ||(s->codecCtx->skip_loop_filter >= AVDISCARD_BIDIR && h->slice_type_nos == FF_B_TYPE) + ||(s->codecCtx->skip_loop_filter >= AVDISCARD_NONREF && h->nal_ref_idc == 0)) + + Both + if( (codecCtx->skip_frame >= AVDISCARD_NONREF && s2->pict_type==FF_B_TYPE) + ||(codecCtx->skip_frame >= AVDISCARD_NONKEY && s2->pict_type!=FF_I_TYPE) + || codecCtx->skip_frame >= AVDISCARD_ALL) + break; */ if (skip_B_frames) codecCtx->skip_frame = AVDISCARD_NONREF; // codecCtx->skip_loop_filter = AVDISCARD_NONKEY; -// codecCtx->skip_idct = AVDISCARD_NONKEY; + // codecCtx->skip_idct = AVDISCARD_NONKEY; break; default: @@ -1361,16 +1330,16 @@ void file_open() is = global_video_state; // will interrupt blocking functions if we quit! -// avformat_network_init(); + // avformat_network_init(); // Open video file if ( is->pFormatCtx == NULL) { pFormatCtx = avformat_alloc_context(); -// pFormatCtx->max_analyze_duration *= 40; -// pFormatCtx->probesize = 40000000; -again: + // pFormatCtx->max_analyze_duration *= 40; + // pFormatCtx->probesize = 40000000; + again: if(avformat_open_input(&pFormatCtx, is->filename, NULL, NULL)!=0) { fprintf(stderr, "%s: Can not open file\n", is->filename); @@ -1385,9 +1354,9 @@ void file_open() is->pFormatCtx = pFormatCtx; -// pFormatCtx->max_analyze_duration = 320000000; + // pFormatCtx->max_analyze_duration = 320000000; -// pFormatCtx->thread_count= 2; + // pFormatCtx->thread_count= 2; // Retrieve stream information if(av_find_stream_info(is->pFormatCtx)<0) @@ -1414,10 +1383,10 @@ void file_open() { video_index = av_find_best_stream(is->pFormatCtx, AVMEDIA_TYPE_VIDEO, -1, -1, NULL, 0); if(video_index >= 0 -// && -// is->pFormatCtx->streams[video_index]->codec->width > 100 && -// is->pFormatCtx->streams[video_index]->codec->height > 100 - ) + // && + // is->pFormatCtx->streams[video_index]->codec->width > 100 && + // is->pFormatCtx->streams[video_index]->codec->height > 100 + ) { stream_component_open(is, video_index); } @@ -1485,35 +1454,32 @@ void file_close() is->videoStream = -1; if (is->audioStream != -1) avcodec_close(is->pFormatCtx->streams[is->audioStream]->codec); is->audioStream = -1; -// avcodec_close(is->pFormatCtx->streams[is->subtitleStream]->codec); + // avcodec_close(is->pFormatCtx->streams[is->subtitleStream]->codec); is->subtitleStream = -1; av_close_input_file(is->pFormatCtx); is->pFormatCtx = NULL; -// global_video_state = NULL; + // global_video_state = NULL; }; /* + https://www.livemeeting.com/cc/philipsconnectwebmeeting/join?id=M7ZF6B&role=attend&pw=5%7E.%7EtS%60p2 + // crt_wcstombs.c + #include + #include -https://www.livemeeting.com/cc/philipsconnectwebmeeting/join?id=M7ZF6B&role=attend&pw=5%7E.%7EtS%60p2 - + int main( void ) + { + int i; + char *pmbbuf = (char *)malloc( 100 ); + wchar_t *pwchello = L"Hello, world."; -// crt_wcstombs.c -#include -#include - -int main( void ) -{ - int i; - char *pmbbuf = (char *)malloc( 100 ); - wchar_t *pwchello = L"Hello, world."; - - printf( "Convert wide-character string:\n" ); - i = wcstombs( pmbbuf, pwchello, 100 ); - printf( " Characters converted: %u\n", i ); - printf( " Multibyte character: %s\n\n", pmbbuf ); -} + printf( "Convert wide-character string:\n" ); + i = wcstombs( pmbbuf, pwchello, 100 ); + printf( " Characters converted: %u\n", i ); + printf( " Multibyte character: %s\n\n", pmbbuf ); + } */ // copied & modified from mingw-runtime-3.13's init.c @@ -1521,9 +1487,8 @@ typedef struct { int newmode; } _startupinfo; -extern void __wgetmainargs (int *, wchar_t ***, wchar_t ***, int, _startupinfo - *); +extern void __wgetmainargs (int *, wchar_t ***, wchar_t ***, int, _startupinfo*); int main (int argc, char ** argv) { @@ -1536,9 +1501,6 @@ int main (int argc, char ** argv) int ret; double retry_target; - -// fpos_t fileendpos; - #ifdef SELFTEST int tries = 0; #endif @@ -1556,8 +1518,6 @@ int main (int argc, char ** argv) start_info.newmode = 0; __wgetmainargs(&_argc, &_argv, &dummy_environ, -1, &start_info); - - char *aargv[20]; char (argt[20])[1000]; @@ -1573,21 +1533,21 @@ int main (int argc, char ** argv) #endif #ifndef _DEBUG -// __tr y { // raise_ exception(); #endif -// output_debugwindow = 1; - + // output_debugwindow = 1; if (strstr(argv[0],"comskipGUI")) + { output_debugwindow = 1; + } else { #ifdef _WIN32 //added windows specific -// SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS); -// SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_HIGHEST); + // SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS); + // SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_HIGHEST); #endif } //get path to executable @@ -1603,8 +1563,12 @@ int main (int argc, char ** argv) } strncpy(HomeDir, ptr, len); - len = (size_t)max(0,strrchr(HomeDir,'\\') - HomeDir); - if (len==0) + char* HomeDirSeparator = strrchr(HomeDir, '/'); + if (HomeDirSeparator == NULL) + { + HomeDirSeparator = strrchr(HomeDir, '\\'); + } + if (HomeDirSeparator == NULL) { HomeDir[0] = '.'; HomeDir[1] = '\0'; @@ -1615,41 +1579,20 @@ int main (int argc, char ** argv) } fprintf (stderr, "Comskip %s.%s, made using avcodec\n", COMSKIPVERSION,SUBVERSION); - -#ifdef _WIN32 -#ifdef HAVE_IO_H -// _setmode (_fileno (stdin), O_BINARY); -// _setmode (_fileno (stdout), O_BINARY); -#endif -#endif - - -#ifdef _WIN32 - //added windows specific -// if (!live_tv) SetThreadPriority(GetCurrentThread(), /* THREAD_MODE_BACKGROUND_BEGIN */ 0x00010000); // This will fail in XP but who cares - -#endif - - - in_file = LoadSettings(argc, argv); - file_open(); - - - csRestart = 0; framenum = 0; DUMP_OPEN - av_log_set_level(AV_LOG_WARNING); + av_log_set_level(AV_LOG_WARNING); av_log_set_flags(AV_LOG_SKIP_REPEATED); is = global_video_state; packet = &(is->audio_pkt); // main decode loop -again: + again: for(;;) { if(is->quit) @@ -1689,16 +1632,6 @@ int main (int argc, char ** argv) fclose(sample_file); } is->seek_req=0; -// if(stream_index>=0) {is->video_st->start_time -// seek_target= av_rescale_q(seek_target, AV_TIME_BASE_Q, is->pFormatCtx->streams[stream_index]->time_base); -// } -// is->seek_flags = AVSEEK_FLAG_BACKWARD; -// if (strcmp(is->pFormatCtx->iformat->name,"wtv")==0)is->video_st->start_time -// is->seek_flags = AVSEEK_FLAG_BACKWARD; -// seek_target = 0; -// if(strcmp(is->pFormatCtx->iformat->name,"wtv")==0 || av_seek_frame(is->pFormatCtx, stream_index, seek_target, AVSEEK_FLAG_BYTE) < 0) { -// if(av_seek_frame(is->pFormatCtx, stream_index, seek_target, AVSEEK_FLAG_BACKWARD) < 0) { -// if(av_seek_frame(is->pFormatCtx, stream_index, seek_target, AVSEEK_FLAG_BYTE) < 0) { if (ret < 0) { @@ -1721,8 +1654,6 @@ int main (int argc, char ** argv) else #endif { - - is->seek_req = 0; framenum = 0; pts_offset = 0.0; @@ -1737,42 +1668,40 @@ int main (int argc, char ** argv) initial_apts = 0; audio_samples = 0; } - // best_effort_timestamp = AV_NOPTS_VALUE; -// is->pFrame->pkt_pts = AV_NOPTS_VALUE; -// is->pFrame->pkt_dts = AV_NOPTS_VALUE; - - } + + // ret=av_read_frame(is->pFormatCtx, packet); if ((selftest == 3 && retries==0 && is->video_clock >=30.0)) ret=AVERROR_EOF; if(ret < 0 ) { - if (ret == AVERROR_EOF || url_feof(is->pFormatCtx->pb)) - { - if (retries < live_tv_retries /* && ( url_feof (is->pFormatCtx->pb) || selftest != 0) */) { - if (retries==0) retry_target = is->video_clock; - file_close(); - Debug( 1,"\nRetry=%d at frame=%d, time=%8.2f seconds\n", retries, framenum, retry_target); - Sleep(4000L); - file_open(); - Set_seek(is, retry_target, is->duration); - retries++; - selftest = 0; - goto again; - } + if (ret == AVERROR_EOF || url_feof(is->pFormatCtx->pb)) + { + if (retries < live_tv_retries) { + if (retries==0) retry_target = is->video_clock; + file_close(); + // debug info + char debug_error_code[256]; + sprintf(debug_error_code, "%d (detail is here:http://www.ffmpeg.org/doxygen/trunk/group__lavu__error.html)", ret); + Debug(1,"\nReturnCode=%s\n", (ret == AVERROR_EOF) ? "AVERROR_EOF (End of file.)" : debug_error_code); + Debug(1,"\nRetry=%d at frame=%d, time=%8.2f seconds\n", retries, framenum, retry_target); - // xxxxxxxxx - /* - if(url_ferror(is->pFormatCtx->pb) == 0) { - continue; - } else - */ +#ifdef _WIN32 + Sleep(4000L); +#else + sleep(4); +#endif + + file_open(); + Set_seek(is, retry_target, is->duration); + retries++; + selftest = 0; + goto again; + } break; } - - } @@ -1792,14 +1721,6 @@ int main (int argc, char ** argv) is->duration, is->filename); fclose(sample_file); - /* - if (tries == 0 && fabs((double) av_q2d(is->video_st->time_base)* ((double)(packet->pts - is->video_st->start_time - is->seek_pos ))) > 2.0) { - is->seek_req=1; - is->seek_pos = 20.0 / av_q2d(is->video_st->time_base); - is->seek_flags = AVSEEK_FLAG_BYTE; - tries++; - } else - */ exit(1); } #endif @@ -1811,39 +1732,43 @@ int main (int argc, char ** argv) } else { - /* - ccDataLen = (int)packet->size; - for (i=0; idata[i]; - } - dump_data(ccData, (int)ccDataLen); - if (output_srt) - process_block(ccData, (int)ccDataLen); - if (processCC) ProcessCCData(); - */ + // do nothing } av_free_packet(packet); #ifdef SELFTEST if (selftest == 1 && is->seek_req == 0 && framenum == 500) { - double frame_delay = av_q2d(is->video_st->codec->time_base)* is->video_st->codec->ticks_per_frame; // <------------------------ frame delay is the time in seconds till the next frame + double frame_delay = av_q2d(is->video_st->codec->time_base)* is->video_st->codec->ticks_per_frame; // <------------------------ frame delay is the time in seconds till the next frame Set_seek(is, 30.0, 10000.0); framenum++; } #endif } - Debug( 10,"\nParsed %d video frames and %d audio frames of %4.2f fps\n", framenum, sound_frame_counter, get_fps()); + Debug( 10,"\nParsed %d video frames and %d audio frames of %4.2f fps\n", + framenum, sound_frame_counter, get_fps()); Debug( 10,"\nMaximum Volume found is %d\n", max_volume_found); + if (framenum > 0) + { + // (int) byterate = (fpos_t) fileendpos / (int) framenum : fpos_t is struct +#if defined(_WIN32) || defined(__FreeBSD__) byterate = fileendpos / framenum; +#else + byterate = fileendpos.__pos / framenum; +#endif + } print_fps (1); in_file = 0; if (framenum>0) { +#if defined(_WIN32) || defined(__FreeBSD__) byterate = fileendpos / framenum; +#else + byterate = fileendpos.__pos / framenum; +#endif if(BuildMasterCommList()) { result = 1; @@ -1860,31 +1785,27 @@ int main (int argc, char ** argv) printf("Close window when done\n"); DUMP_CLOSE - if (output_timing) - { - output_timing = 0; - } + if (output_timing) + { + output_timing = 0; + } #ifndef GUI while(1) { ReviewResult(); - vo_refresh(); +#ifdef _WIN32 Sleep((DWORD)100); +#else + Sleep(100); +#endif } #endif - // printf(" Press Enter to close debug window\n"); - // gets(HomeDir); } } #ifndef _DEBUG } -// __exc ept(filter()) /* Stage 3 */ -// { -// printf("Exception raised, terminating\n");/* Stage 5 of terminating exception */ -// exit(result); -// } #endif exit (result); } diff --git a/video_out_dx.c b/video_out_dx.c index c2ad3b3..39d1eb2 100644 --- a/video_out_dx.c +++ b/video_out_dx.c @@ -36,7 +36,7 @@ //#define vo_instance_t struct dx_instance typedef struct { - int dummy; + int dummy; } vo_setup_result_t; @@ -86,22 +86,22 @@ HWND hWind; typedef struct { // vo_instance_t vo; - int width; - int height; - - HWND window; - RECT window_coords; - HINSTANCE hddraw_dll; - LPDIRECTDRAW2 ddraw; - LPDIRECTDRAWSURFACE2 display; - LPDIRECTDRAWCLIPPER clipper; - LPDIRECTDRAWSURFACE2 frame[3]; - int index; - - LPDIRECTDRAWSURFACE2 overlay; - uint8_t * yuv[3]; - int stride; - char title[256]; + int width; + int height; + + HWND window; + RECT window_coords; + HINSTANCE hddraw_dll; + LPDIRECTDRAW2 ddraw; + LPDIRECTDRAWSURFACE2 display; + LPDIRECTDRAWCLIPPER clipper; + LPDIRECTDRAWSURFACE2 frame[3]; + int index; + + LPDIRECTDRAWSURFACE2 overlay; + uint8_t * yuv[3]; + int stride; + char title[256]; } dx_instance_t; @@ -116,182 +116,182 @@ static void dx_draw_frame (vo_instance_t * , uint8_t * const * , void * ); /* -char *ExtFilter[] = -{ - ".avi", ".d2s", ".d2v", ".wav" -}; - - -BOOL PopFileDlg(PTSTR pstrFileName, HWND hOwner, int Status) -{ - static char *szFilter, *ext; - int count = 0; - - switch (Status) - { - case OPEN_VOB: - szFilter = TEXT ("MPEG-2 Files (*.vob; *.m2p; *.m2v; *.mpv; *.trp; *.ts; *.tp)\0*.vob;*.m2p;*.m2v;*.mpv;*.trp;*.ts;*.tp\0") \ - TEXT ("Program Streams (*.vob; *.m2p; *.m2v; *.mpv)\0*.vob;*.m2p;*.m2v;*.mpv\0") \ - TEXT ("Transport Streams (*.trp; *.ts; *.tp)\0*.trp;*.ts;*.tp\0") \ - TEXT ("All Files (*.*)\0*.*\0"); - break; - - case SAVE_AVI: - szFilter = TEXT ("AVI File (*.avi)\0*.avi; *.ac3; *.wav; *.mpa\0") \ - TEXT ("All Files (*.*)\0*.*\0"); - break; - - case OPEN_D2V: - szFilter = TEXT ("DVD2AVI Project File (*.d2v)\0*.d2v\0") \ - TEXT ("All Files (*.*)\0*.*\0"); - break; - - case SAVE_D2V: - szFilter = TEXT ("DVD2AVI Project File (*.d2v)\0*.d2v\0") \ - TEXT ("All Files (*.*)\0*.*\0"); - break; + char *ExtFilter[] = + { + ".avi", ".d2s", ".d2v", ".wav" + }; + + + BOOL PopFileDlg(PTSTR pstrFileName, HWND hOwner, int Status) + { + static char *szFilter, *ext; + int count = 0; + + switch (Status) + { + case OPEN_VOB: + szFilter = TEXT ("MPEG-2 Files (*.vob; *.m2p; *.m2v; *.mpv; *.trp; *.ts; *.tp)\0*.vob;*.m2p;*.m2v;*.mpv;*.trp;*.ts;*.tp\0") \ + TEXT ("Program Streams (*.vob; *.m2p; *.m2v; *.mpv)\0*.vob;*.m2p;*.m2v;*.mpv\0") \ + TEXT ("Transport Streams (*.trp; *.ts; *.tp)\0*.trp;*.ts;*.tp\0") \ + TEXT ("All Files (*.*)\0*.*\0"); + break; + + case SAVE_AVI: + szFilter = TEXT ("AVI File (*.avi)\0*.avi; *.ac3; *.wav; *.mpa\0") \ + TEXT ("All Files (*.*)\0*.*\0"); + break; + + case OPEN_D2V: + szFilter = TEXT ("DVD2AVI Project File (*.d2v)\0*.d2v\0") \ + TEXT ("All Files (*.*)\0*.*\0"); + break; + + case SAVE_D2V: + szFilter = TEXT ("DVD2AVI Project File (*.d2v)\0*.d2v\0") \ + TEXT ("All Files (*.*)\0*.*\0"); + break; - case OPEN_SESS: - szFilter = TEXT ("DVD2AVI Session File (*.d2s)\0*.d2s\0") \ - TEXT ("All Files (*.*)\0*.*\0"); - break; - - case SAVE_SESS: - szFilter = TEXT ("DVD2AVI Session File (*.d2s)\0*.d2s\0") \ - TEXT ("All Files (*.*)\0*.*\0"); - break; - - case OPEN_WAV: - case SAVE_WAV: - szFilter = TEXT ("WAV File (*.wav)\0*.wav\0") \ - TEXT ("All Files (*.*)\0*.*\0"); - break; - } - - ofn.lStructSize = sizeof (OPENFILENAME) ; - ofn.hwndOwner = hOwner ; - ofn.hInstance = hInst ; - ofn.lpstrFilter = szFilter ; - ofn.nMaxFile = _MAX_PATH ; - ofn.nMaxFileTitle = _MAX_PATH ; - ofn.lpstrFile = pstrFileName ; - - switch (Status) - { - case OPEN_VOB: - case OPEN_D2V: - case OPEN_SESS: - case OPEN_WAV: - ofn.Flags = OFN_HIDEREADONLY | OFN_FILEMUSTEXIST; - return GetOpenFileName(&ofn); - - case SAVE_WAV: - count++; - case SAVE_D2V: - count++; - case SAVE_SESS: - count++; - case SAVE_AVI: - ofn.Flags = OFN_HIDEREADONLY | OFN_ALLOWMULTISELECT | OFN_EXPLORER; - if (GetSaveFileName(&ofn)) - { - ext = strrchr(pstrFileName, '.'); - - if (ext!=NULL && !_strnicmp(ext, ExtFilter[count], 4)) - strncpy(ext, ext+4, 1); - - return true; - } - } - - return false; -} + case OPEN_SESS: + szFilter = TEXT ("DVD2AVI Session File (*.d2s)\0*.d2s\0") \ + TEXT ("All Files (*.*)\0*.*\0"); + break; + + case SAVE_SESS: + szFilter = TEXT ("DVD2AVI Session File (*.d2s)\0*.d2s\0") \ + TEXT ("All Files (*.*)\0*.*\0"); + break; + + case OPEN_WAV: + case SAVE_WAV: + szFilter = TEXT ("WAV File (*.wav)\0*.wav\0") \ + TEXT ("All Files (*.*)\0*.*\0"); + break; + } + + ofn.lStructSize = sizeof (OPENFILENAME) ; + ofn.hwndOwner = hOwner ; + ofn.hInstance = hInst ; + ofn.lpstrFilter = szFilter ; + ofn.nMaxFile = _MAX_PATH ; + ofn.nMaxFileTitle = _MAX_PATH ; + ofn.lpstrFile = pstrFileName ; + + switch (Status) + { + case OPEN_VOB: + case OPEN_D2V: + case OPEN_SESS: + case OPEN_WAV: + ofn.Flags = OFN_HIDEREADONLY | OFN_FILEMUSTEXIST; + return GetOpenFileName(&ofn); + + case SAVE_WAV: + count++; + case SAVE_D2V: + count++; + case SAVE_SESS: + count++; + case SAVE_AVI: + ofn.Flags = OFN_HIDEREADONLY | OFN_ALLOWMULTISELECT | OFN_EXPLORER; + if (GetSaveFileName(&ofn)) + { + ext = strrchr(pstrFileName, '.'); + + if (ext!=NULL && !_strnicmp(ext, ExtFilter[count], 4)) + strncpy(ext, ext+4, 1); + + return true; + } + } + + return false; + } */ int PopFileDlg(HWND hWind, PTSTR pstrFileName, int Status) { - static OPENFILENAME ofn; - static char *szFilter, *ext; - - switch (Status) { - case OPEN_INPUT: - ofn.nFilterIndex = 1; - szFilter = \ - TEXT ("mpg, mpeg, m2v, mpv\0*.mpg;*.mpeg;*.m2v;*.mpv\0") \ - TEXT ("tp, ts\0*.tp;*.ts\0") \ - TEXT ("dvr-ms\0*.dvr-ms\0") \ - TEXT ("All MPEG Files\0*.vob;*.mpg;*.mpeg;*.m1v;*.m2v;*.mpv;*.tp;*.ts;*.trp;*.pva;*.vro\0") \ - TEXT ("All Files (*.*)\0*.*\0"); - break; - - case SAVE_DMP: - szFilter = TEXT ("DMP File (*.dmp)\0*.dmp\0") \ - TEXT ("All Files (*.*)\0*.*\0"); - break; - - case OPEN_INI: - case SAVE_INI: - szFilter = TEXT ("Comskip INI File (*.d2v)\0*.d2v\0") \ - TEXT ("All Files (*.*)\0*.*\0"); - break; - - } - - ofn.lStructSize = sizeof (OPENFILENAME) ; - ofn.hwndOwner = hWind; - ofn.hInstance = hInst ; - ofn.lpstrFilter = szFilter ; - ofn.nMaxFile = 1024 ; - ofn.nMaxFileTitle = 1024 ; - ofn.lpstrFile = pstrFileName ; - ofn.lpstrInitialDir = TEXT("."); - - switch (Status) { - case OPEN_INPUT: - case OPEN_INI: - *ofn.lpstrFile = 0; - ofn.Flags = OFN_HIDEREADONLY | OFN_FILEMUSTEXIST | OFN_EXPLORER; - return GetOpenFileName(&ofn); - - case SAVE_DMP: - *ofn.lpstrFile = 0; - ofn.Flags = OFN_HIDEREADONLY | OFN_EXPLORER; - if (GetSaveFileName(&ofn)) { - ext = strrchr(pstrFileName, '.'); - if (ext!=NULL && !_strnicmp(ext, ".dmp", 4)) - *ext = 0; - return 1; - } - break; - - case SAVE_INI: - *ofn.lpstrFile = 0; - ofn.Flags = OFN_HIDEREADONLY | OFN_EXPLORER; - if (GetSaveFileName(&ofn)) { - ext = strrchr(pstrFileName, '.'); - if (ext!=NULL && !_strnicmp(ext, ".ini", 4)) - *ext = 0; - return 1; - } - break; - } - return 0; + static OPENFILENAME ofn; + static char *szFilter, *ext; + + switch (Status) { + case OPEN_INPUT: + ofn.nFilterIndex = 1; + szFilter = \ + TEXT ("mpg, mpeg, m2v, mpv\0*.mpg;*.mpeg;*.m2v;*.mpv\0") \ + TEXT ("tp, ts\0*.tp;*.ts\0") \ + TEXT ("dvr-ms\0*.dvr-ms\0") \ + TEXT ("All MPEG Files\0*.vob;*.mpg;*.mpeg;*.m1v;*.m2v;*.mpv;*.tp;*.ts;*.trp;*.pva;*.vro\0") \ + TEXT ("All Files (*.*)\0*.*\0"); + break; + + case SAVE_DMP: + szFilter = TEXT ("DMP File (*.dmp)\0*.dmp\0") \ + TEXT ("All Files (*.*)\0*.*\0"); + break; + + case OPEN_INI: + case SAVE_INI: + szFilter = TEXT ("Comskip INI File (*.d2v)\0*.d2v\0") \ + TEXT ("All Files (*.*)\0*.*\0"); + break; + + } + + ofn.lStructSize = sizeof (OPENFILENAME) ; + ofn.hwndOwner = hWind; + ofn.hInstance = hInst ; + ofn.lpstrFilter = szFilter ; + ofn.nMaxFile = 1024 ; + ofn.nMaxFileTitle = 1024 ; + ofn.lpstrFile = pstrFileName ; + ofn.lpstrInitialDir = TEXT("."); + + switch (Status) { + case OPEN_INPUT: + case OPEN_INI: + *ofn.lpstrFile = 0; + ofn.Flags = OFN_HIDEREADONLY | OFN_FILEMUSTEXIST | OFN_EXPLORER; + return GetOpenFileName(&ofn); + + case SAVE_DMP: + *ofn.lpstrFile = 0; + ofn.Flags = OFN_HIDEREADONLY | OFN_EXPLORER; + if (GetSaveFileName(&ofn)) { + ext = strrchr(pstrFileName, '.'); + if (ext!=NULL && !_strnicmp(ext, ".dmp", 4)) + *ext = 0; + return 1; + } + break; + + case SAVE_INI: + *ofn.lpstrFile = 0; + ofn.Flags = OFN_HIDEREADONLY | OFN_EXPLORER; + if (GetSaveFileName(&ofn)) { + ext = strrchr(pstrFileName, '.'); + if (ext!=NULL && !_strnicmp(ext, ".ini", 4)) + *ext = 0; + return 1; + } + break; + } + return 0; } static void update_overlay (dx_instance_t * instance) { - DDOVERLAYFX ddofx; - DWORD dwFlags; - - memset (&ddofx, 0, sizeof (DDOVERLAYFX)); - ddofx.dwSize = sizeof (DDOVERLAYFX); - dwFlags = DDOVER_SHOW | DDOVER_KEYDESTOVERRIDE; - IDirectDrawSurface2_UpdateOverlay (instance->overlay, NULL, - instance->display, - &instance->window_coords, - dwFlags, &ddofx); + DDOVERLAYFX ddofx; + DWORD dwFlags; + + memset (&ddofx, 0, sizeof (DDOVERLAYFX)); + ddofx.dwSize = sizeof (DDOVERLAYFX); + dwFlags = DDOVER_SHOW | DDOVER_KEYDESTOVERRIDE; + IDirectDrawSurface2_UpdateOverlay (instance->overlay, NULL, + instance->display, + &instance->window_coords, + dwFlags, &ddofx); } static int drag = 0; @@ -304,18 +304,18 @@ static DWORD threadId; // Mesage handler for about box. static long FAR PASCAL About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { - switch (message) { - case WM_INITDIALOG: - return TRUE; - - case WM_COMMAND: - if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) { - EndDialog(hDlg, LOWORD(wParam)); - return TRUE; - } - break; - } - return FALSE; + switch (message) { + case WM_INITDIALOG: + return TRUE; + + case WM_COMMAND: + if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) { + EndDialog(hDlg, LOWORD(wParam)); + return TRUE; + } + break; + } + return FALSE; } @@ -323,463 +323,463 @@ static long FAR PASCAL About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPar static long FAR PASCAL event_procedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { - RECT rect_window; - POINT point_window; - dx_instance_t * instance; - short wmId, wmEvent; - - switch (message) { - case WM_COMMAND: - wmId = LOWORD(wParam); - wmEvent = HIWORD(wParam); - // Parse the menu selections: - switch (wmId) { - case IDM_ABOUT: - DialogBox (hInst, (LPCTSTR)IDD_ABOUT, hwnd, (DLGPROC)About); - break; - case IDM_EXIT: - PostQuitMessage(0); - exit(1); - break; - default: - return DefWindowProc (hwnd, message, wParam, lParam); - } - break; - case WM_SHOWWINDOW: - case WM_ACTIVATEAPP: - key = '.'; - break; - - case WM_WINDOWPOSCHANGED: - instance = (dx_instance_t *) GetWindowLongPtr(hwnd, GWLP_USERDATA); - - /* update the window position and size */ - point_window.x = 0; - point_window.y = 0; - ClientToScreen (hwnd, &point_window); - instance->window_coords.left = point_window.x; - instance->window_coords.top = point_window.y; - GetClientRect (hwnd, &rect_window); - instance->window_coords.right = rect_window.right + point_window.x; - instance->window_coords.bottom = rect_window.bottom + point_window.y; - - key = '.'; - - /* update the overlay */ - if (instance->overlay && instance->display) - update_overlay (instance); - - // return 0; - - case WM_PAINT: - hdc = BeginPaint(hwnd, &ps); - EndPaint(hwnd, &ps); - ReleaseDC(hwnd, hdc); - key = '.'; - - break; - - - case WM_CLOSE: - // ReleaseDC(hWnd, hDC); - // DeleteObject(hBrush); - - PostQuitMessage(0); - break; - - return 0; - - case WM_DESTROY: /* just destroy the window */ - PostQuitMessage (0); - return 0; - - case WM_LBUTTONDOWN: - if (lParam > -1) { - xPos = (int)(LOWORD(lParam)); - yPos = (int)(HIWORD(lParam)); - lMouseDown = 1; - drag = 1; - } - break; - case WM_MOUSEMOVE: - if (lParam > -1 && drag) { - xPos = (int)(LOWORD(lParam)); - yPos = (int)(HIWORD(lParam)); - lMouseDown = 1; - - } - break; - case WM_LBUTTONUP: - if (lParam > -1) { - drag = 0; - - } - break; - - - case WM_KEYDOWN: - - switch (wParam) { - case VK_DOWN: - key = 1; - break; - - case VK_UP: - key = 2; - break; - - case VK_LEFT: - key = 3; - break; - - case VK_RIGHT: - key = 4; - break; - - case VK_NEXT: - key = 5; - break; - - case VK_PRIOR: - key = 6; - break; - } - if (wParam != 0) { - key = wParam; - if (key == 'C') - // if(PopFileDlg(hwnd, osname, SAVE_DMP) == 0) - // key = 0; - // else - key = 'C'; - } - break; - case WM_SETFOCUS: - case WM_ACTIVATE: - if (key != 'C') - key = '.'; - break; - default: - key = key; - break; - } - /* - if (key || lMouseDown) { - if (!threadId || WaitForSingleObject(hThread, INFINITE)==WAIT_OBJECT_0) - hThread = CreateThread(NULL, 0, MPEG2Dec, 0, 0, &threadId); - } - */ - return DefWindowProc (hwnd, message, wParam, lParam); + RECT rect_window; + POINT point_window; + dx_instance_t * instance; + short wmId, wmEvent; + + switch (message) { + case WM_COMMAND: + wmId = LOWORD(wParam); + wmEvent = HIWORD(wParam); + // Parse the menu selections: + switch (wmId) { + case IDM_ABOUT: + DialogBox (hInst, (LPCTSTR)IDD_ABOUT, hwnd, (DLGPROC)About); + break; + case IDM_EXIT: + PostQuitMessage(0); + exit(1); + break; + default: + return DefWindowProc (hwnd, message, wParam, lParam); + } + break; + case WM_SHOWWINDOW: + case WM_ACTIVATEAPP: + key = '.'; + break; + + case WM_WINDOWPOSCHANGED: + instance = (dx_instance_t *) GetWindowLongPtr(hwnd, GWLP_USERDATA); + + /* update the window position and size */ + point_window.x = 0; + point_window.y = 0; + ClientToScreen (hwnd, &point_window); + instance->window_coords.left = point_window.x; + instance->window_coords.top = point_window.y; + GetClientRect (hwnd, &rect_window); + instance->window_coords.right = rect_window.right + point_window.x; + instance->window_coords.bottom = rect_window.bottom + point_window.y; + + key = '.'; + + /* update the overlay */ + if (instance->overlay && instance->display) + update_overlay (instance); + + // return 0; + + case WM_PAINT: + hdc = BeginPaint(hwnd, &ps); + EndPaint(hwnd, &ps); + ReleaseDC(hwnd, hdc); + key = '.'; + + break; + + + case WM_CLOSE: + // ReleaseDC(hWnd, hDC); + // DeleteObject(hBrush); + + PostQuitMessage(0); + break; + + return 0; + + case WM_DESTROY: /* just destroy the window */ + PostQuitMessage (0); + return 0; + + case WM_LBUTTONDOWN: + if (lParam > -1) { + xPos = (int)(LOWORD(lParam)); + yPos = (int)(HIWORD(lParam)); + lMouseDown = 1; + drag = 1; + } + break; + case WM_MOUSEMOVE: + if (lParam > -1 && drag) { + xPos = (int)(LOWORD(lParam)); + yPos = (int)(HIWORD(lParam)); + lMouseDown = 1; + + } + break; + case WM_LBUTTONUP: + if (lParam > -1) { + drag = 0; + + } + break; + + + case WM_KEYDOWN: + + switch (wParam) { + case VK_DOWN: + key = 1; + break; + + case VK_UP: + key = 2; + break; + + case VK_LEFT: + key = 3; + break; + + case VK_RIGHT: + key = 4; + break; + + case VK_NEXT: + key = 5; + break; + + case VK_PRIOR: + key = 6; + break; + } + if (wParam != 0) { + key = wParam; + if (key == 'C') + // if(PopFileDlg(hwnd, osname, SAVE_DMP) == 0) + // key = 0; + // else + key = 'C'; + } + break; + case WM_SETFOCUS: + case WM_ACTIVATE: + if (key != 'C') + key = '.'; + break; + default: + key = key; + break; + } + /* + if (key || lMouseDown) { + if (!threadId || WaitForSingleObject(hThread, INFINITE)==WAIT_OBJECT_0) + hThread = CreateThread(NULL, 0, MPEG2Dec, 0, 0, &threadId); + } + */ + return DefWindowProc (hwnd, message, wParam, lParam); } GetDumpFileName() { - PopFileDlg(hWind, osname, SAVE_DMP); + PopFileDlg(hWind, osname, SAVE_DMP); } static void check_events (dx_instance_t * instance) { - MSG msg; + MSG msg; - while (PeekMessage (&msg, instance->window, 0, 0, PM_REMOVE)) { - // while (GetMessage (&msg, instance->window, 0, 0, PM_REMOVE)) { - TranslateMessage (&msg); - DispatchMessage (&msg); - } + while (PeekMessage (&msg, instance->window, 0, 0, PM_REMOVE)) { + // while (GetMessage (&msg, instance->window, 0, 0, PM_REMOVE)) { + TranslateMessage (&msg); + DispatchMessage (&msg); + } } static void wait_events (dx_instance_t * instance) { - MSG msg; + MSG msg; - // while (PeekMessage (&msg, instance->window, 0, 0, PM_REMOVE)) { - while (!key && !lMouseDown && GetMessage (&msg, NULL,0,0)) { - TranslateMessage (&msg); - DispatchMessage (&msg); - } + // while (PeekMessage (&msg, instance->window, 0, 0, PM_REMOVE)) { + while (!key && !lMouseDown && GetMessage (&msg, NULL,0,0)) { + TranslateMessage (&msg); + DispatchMessage (&msg); + } } static int create_window (dx_instance_t * instance) { - RECT rect_window; - WNDCLASSEX wc; - - wc.cbSize = sizeof (WNDCLASSEX); - wc.style = CS_DBLCLKS; - wc.lpfnWndProc = (WNDPROC) event_procedure; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = GetModuleHandle (NULL); - hInst = wc.hInstance; - wc.hIcon = NULL; - wc.hCursor = LoadCursor (NULL, IDC_ARROW); - wc.hbrBackground = CreateSolidBrush (RGB (0, 0, 0)); + RECT rect_window; + WNDCLASSEX wc; + + wc.cbSize = sizeof (WNDCLASSEX); + wc.style = CS_DBLCLKS; + wc.lpfnWndProc = (WNDPROC) event_procedure; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = GetModuleHandle (NULL); + hInst = wc.hInstance; + wc.hIcon = NULL; + wc.hCursor = LoadCursor (NULL, IDC_ARROW); + wc.hbrBackground = CreateSolidBrush (RGB (0, 0, 0)); // wc.lpszMenuName = (LPCSTR)IDC_GUI; - wc.lpszMenuName = NULL; - wc.lpszClassName = "libvo_dx"; - wc.hIconSm = NULL; - if (!RegisterClassEx (&wc)) { - fprintf (stderr, "Can not register window class\n"); - return 1; - } - - rect_window.top = 10; - rect_window.left = 10; - rect_window.right = rect_window.left + instance->width; - rect_window.bottom = rect_window.top + instance->height; - AdjustWindowRect (&rect_window, WS_OVERLAPPEDWINDOW|WS_SIZEBOX, 0); - - instance->window = CreateWindow ("libvo_dx", instance->title, - WS_OVERLAPPEDWINDOW | WS_SIZEBOX, - CW_USEDEFAULT, 0, - rect_window.right - rect_window.left, - rect_window.bottom - rect_window.top, - NULL, NULL, GetModuleHandle (NULL), NULL); - if (instance->window == NULL) { - fprintf (stderr, "Can not create window\n"); - return 1; - } - - /* store a directx_instance pointer into the window local storage - * (for later use in event_handler). - * We need to use SetWindowLongPtr when it is available in mingw */ - SetWindowLongPtr(instance->window, GWLP_USERDATA, (LONG_PTR)instance); - SetWindowPos(instance->window, HWND_TOP, 0, 0, 0, 0, SWP_SHOWWINDOW|SWP_NOSIZE); - - ShowWindow (instance->window, SW_SHOW); - - return 0; + wc.lpszMenuName = NULL; + wc.lpszClassName = "libvo_dx"; + wc.hIconSm = NULL; + if (!RegisterClassEx (&wc)) { + fprintf (stderr, "Can not register window class\n"); + return 1; + } + + rect_window.top = 10; + rect_window.left = 10; + rect_window.right = rect_window.left + instance->width; + rect_window.bottom = rect_window.top + instance->height; + AdjustWindowRect (&rect_window, WS_OVERLAPPEDWINDOW|WS_SIZEBOX, 0); + + instance->window = CreateWindow ("libvo_dx", instance->title, + WS_OVERLAPPEDWINDOW | WS_SIZEBOX, + CW_USEDEFAULT, 0, + rect_window.right - rect_window.left, + rect_window.bottom - rect_window.top, + NULL, NULL, GetModuleHandle (NULL), NULL); + if (instance->window == NULL) { + fprintf (stderr, "Can not create window\n"); + return 1; + } + + /* store a directx_instance pointer into the window local storage + * (for later use in event_handler). + * We need to use SetWindowLongPtr when it is available in mingw */ + SetWindowLongPtr(instance->window, GWLP_USERDATA, (LONG_PTR)instance); + SetWindowPos(instance->window, HWND_TOP, 0, 0, 0, 0, SWP_SHOWWINDOW|SWP_NOSIZE); + + ShowWindow (instance->window, SW_SHOW); + + return 0; } static LPDIRECTDRAWSURFACE2 alloc_surface (dx_instance_t * instance, - DDSURFACEDESC * ddsd) + DDSURFACEDESC * ddsd) { - LPDIRECTDRAWSURFACE surface; - LPDIRECTDRAWSURFACE2 surface2; - - if (DD_OK != IDirectDraw2_CreateSurface (instance->ddraw, ddsd, - &surface, NULL) || - DD_OK != IDirectDrawSurface_QueryInterface (surface, - &IID_IDirectDrawSurface2, - (LPVOID *) &surface2)) { - fprintf (stderr, "Can not create directDraw frame surface\n"); - return NULL; - } - IDirectDrawSurface_Release (surface); - - return surface2; + LPDIRECTDRAWSURFACE surface; + LPDIRECTDRAWSURFACE2 surface2; + + if (DD_OK != IDirectDraw2_CreateSurface (instance->ddraw, ddsd, + &surface, NULL) || + DD_OK != IDirectDrawSurface_QueryInterface (surface, + &IID_IDirectDrawSurface2, + (LPVOID *) &surface2)) { + fprintf (stderr, "Can not create directDraw frame surface\n"); + return NULL; + } + IDirectDrawSurface_Release (surface); + + return surface2; } static int dx_init (dx_instance_t *instance) { - HRESULT (WINAPI * OurDirectDrawCreate) (GUID *, LPDIRECTDRAW *, - IUnknown *); - LPDIRECTDRAW ddraw; - DDSURFACEDESC ddsd; - - /* load direct draw DLL */ - instance->hddraw_dll = LoadLibrary ("DDRAW.DLL"); - if (instance->hddraw_dll == NULL) { - fprintf (stderr, "Can not load DDRAW.DLL\n"); - return 1; - } - - ddraw = NULL; - OurDirectDrawCreate = (void *) GetProcAddress (instance->hddraw_dll, - "DirectDrawCreate"); - if (OurDirectDrawCreate == NULL || - DD_OK != OurDirectDrawCreate (NULL, &ddraw, NULL) || - DD_OK != IDirectDraw_QueryInterface (ddraw, &IID_IDirectDraw2, - (LPVOID *) &instance->ddraw) || - DD_OK != IDirectDraw_SetCooperativeLevel (instance->ddraw, - instance->window, - DDSCL_NORMAL)) { - fprintf (stderr, "Can not initialize directDraw interface\n"); - return 1; - } - IDirectDraw_Release (ddraw); - - memset (&ddsd, 0, sizeof (DDSURFACEDESC)); - ddsd.dwSize = sizeof (DDSURFACEDESC); - ddsd.dwFlags = DDSD_CAPS; - ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; - instance->display = alloc_surface (instance, &ddsd); - if (instance->display == NULL) { - fprintf (stderr, "Can not create directDraw display surface\n"); - return 1; - } - - if (DD_OK != IDirectDraw2_CreateClipper (instance->ddraw, 0, - &instance->clipper, NULL) || - DD_OK != IDirectDrawClipper_SetHWnd (instance->clipper, 0, - instance->window) || - DD_OK != IDirectDrawSurface_SetClipper (instance->display, - instance->clipper)) { - fprintf (stderr, "Can not initialize directDraw clipper\n"); - return 1; - } - - return 0; + HRESULT (WINAPI * OurDirectDrawCreate) (GUID *, LPDIRECTDRAW *, + IUnknown *); + LPDIRECTDRAW ddraw; + DDSURFACEDESC ddsd; + + /* load direct draw DLL */ + instance->hddraw_dll = LoadLibrary ("DDRAW.DLL"); + if (instance->hddraw_dll == NULL) { + fprintf (stderr, "Can not load DDRAW.DLL\n"); + return 1; + } + + ddraw = NULL; + OurDirectDrawCreate = (void *) GetProcAddress (instance->hddraw_dll, + "DirectDrawCreate"); + if (OurDirectDrawCreate == NULL || + DD_OK != OurDirectDrawCreate (NULL, &ddraw, NULL) || + DD_OK != IDirectDraw_QueryInterface (ddraw, &IID_IDirectDraw2, + (LPVOID *) &instance->ddraw) || + DD_OK != IDirectDraw_SetCooperativeLevel (instance->ddraw, + instance->window, + DDSCL_NORMAL)) { + fprintf (stderr, "Can not initialize directDraw interface\n"); + return 1; + } + IDirectDraw_Release (ddraw); + + memset (&ddsd, 0, sizeof (DDSURFACEDESC)); + ddsd.dwSize = sizeof (DDSURFACEDESC); + ddsd.dwFlags = DDSD_CAPS; + ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; + instance->display = alloc_surface (instance, &ddsd); + if (instance->display == NULL) { + fprintf (stderr, "Can not create directDraw display surface\n"); + return 1; + } + + if (DD_OK != IDirectDraw2_CreateClipper (instance->ddraw, 0, + &instance->clipper, NULL) || + DD_OK != IDirectDrawClipper_SetHWnd (instance->clipper, 0, + instance->window) || + DD_OK != IDirectDrawSurface_SetClipper (instance->display, + instance->clipper)) { + fprintf (stderr, "Can not initialize directDraw clipper\n"); + return 1; + } + + return 0; } static int common_setup (dx_instance_t * instance, int width, int height) { - instance->width = width; - instance->height = height; - instance->index = 0; + instance->width = width; + instance->height = height; + instance->index = 0; - if (create_window (instance) || dx_init (instance)) - return 1; - return 0; + if (create_window (instance) || dx_init (instance)) + return 1; + return 0; } static int dxrgb_setup (dx_instance_t * _instance, unsigned int width, unsigned int height, unsigned int chroma_width, unsigned int chroma_height, vo_setup_result_t * result) { - dx_instance_t * instance = (dx_instance_t *) _instance; - HDC hdc; - int bpp; + dx_instance_t * instance = (dx_instance_t *) _instance; + HDC hdc; + int bpp; - if (common_setup (instance, width, height)) - return 1; + if (common_setup (instance, width, height)) + return 1; - hdc = GetDC (NULL); - bpp = GetDeviceCaps (hdc, BITSPIXEL); - ReleaseDC (NULL, hdc); + hdc = GetDC (NULL); + bpp = GetDeviceCaps (hdc, BITSPIXEL); + ReleaseDC (NULL, hdc); - memset(&birgb, 0, sizeof(BITMAPINFOHEADER)); - birgb.biSize = sizeof(BITMAPINFOHEADER); - birgb.biWidth = width; - birgb.biHeight = height; - birgb.biPlanes = 1; - birgb.biBitCount = 24; - birgb.biCompression = BI_RGB; - birgb.biSizeImage = width * height * 3; + memset(&birgb, 0, sizeof(BITMAPINFOHEADER)); + birgb.biSize = sizeof(BITMAPINFOHEADER); + birgb.biWidth = width; + birgb.biHeight = height; + birgb.biPlanes = 1; + birgb.biBitCount = 24; + birgb.biCompression = BI_RGB; + birgb.biSizeImage = width * height * 3; // result->convert = mpeg2convert_rgb (MPEG2CONVERT_RGB, bpp); - return 0; + return 0; } static int dx_setup (vo_instance_t * _instance, unsigned int width, unsigned int height, unsigned int chroma_width, unsigned int chroma_height, vo_setup_result_t * result) { - dx_instance_t * instance = (dx_instance_t *) _instance; - LPDIRECTDRAWSURFACE2 surface; - DDSURFACEDESC ddsd; + dx_instance_t * instance = (dx_instance_t *) _instance; + LPDIRECTDRAWSURFACE2 surface; + DDSURFACEDESC ddsd; - if (common_setup (instance, width, height)) - return 1; + if (common_setup (instance, width, height)) + return 1; - instance->overlay = alloc_overlay (instance); - if (!instance->overlay) - return 1; - update_overlay (instance); + instance->overlay = alloc_overlay (instance); + if (!instance->overlay) + return 1; + update_overlay (instance); - surface = instance->overlay; + surface = instance->overlay; - /* Get the back buffer */ - memset (&ddsd.ddsCaps, 0, sizeof (DDSCAPS)); - ddsd.ddsCaps.dwCaps = DDSCAPS_BACKBUFFER; - if (DD_OK != IDirectDrawSurface2_GetAttachedSurface (instance->overlay, - &ddsd.ddsCaps, - &surface)) - surface = instance->overlay; + /* Get the back buffer */ + memset (&ddsd.ddsCaps, 0, sizeof (DDSCAPS)); + ddsd.ddsCaps.dwCaps = DDSCAPS_BACKBUFFER; + if (DD_OK != IDirectDrawSurface2_GetAttachedSurface (instance->overlay, + &ddsd.ddsCaps, + &surface)) + surface = instance->overlay; - instance->yuv[0] = surface_addr (surface, &instance->stride); - instance->yuv[2] = instance->yuv[0] + instance->stride * instance->height; - instance->yuv[1] = - instance->yuv[2] + (instance->stride * instance->height >> 2); + instance->yuv[0] = surface_addr (surface, &instance->stride); + instance->yuv[2] = instance->yuv[0] + instance->stride * instance->height; + instance->yuv[1] = + instance->yuv[2] + (instance->stride * instance->height >> 2); // result->convert = NULL; - return 0; + return 0; } static LPDIRECTDRAWSURFACE2 alloc_frame (dx_instance_t * instance) { - DDSURFACEDESC ddsd; - LPDIRECTDRAWSURFACE2 surface; - - memset (&ddsd, 0, sizeof (DDSURFACEDESC)); - ddsd.dwSize = sizeof (DDSURFACEDESC); - ddsd.ddpfPixelFormat.dwSize = sizeof (DDPIXELFORMAT); - ddsd.dwFlags = DDSD_HEIGHT | DDSD_WIDTH | DDSD_CAPS; - ddsd.dwHeight = instance->height; - ddsd.dwWidth = instance->width; - ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY; - - surface = alloc_surface (instance, &ddsd); - if (surface == NULL) - fprintf (stderr, "Can not create directDraw frame surface\n"); - return surface; + DDSURFACEDESC ddsd; + LPDIRECTDRAWSURFACE2 surface; + + memset (&ddsd, 0, sizeof (DDSURFACEDESC)); + ddsd.dwSize = sizeof (DDSURFACEDESC); + ddsd.ddpfPixelFormat.dwSize = sizeof (DDPIXELFORMAT); + ddsd.dwFlags = DDSD_HEIGHT | DDSD_WIDTH | DDSD_CAPS; + ddsd.dwHeight = instance->height; + ddsd.dwWidth = instance->width; + ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY; + + surface = alloc_surface (instance, &ddsd); + if (surface == NULL) + fprintf (stderr, "Can not create directDraw frame surface\n"); + return surface; } static void * surface_addr (LPDIRECTDRAWSURFACE2 surface, int * stride) { - DDSURFACEDESC ddsd; - - memset (&ddsd, 0, sizeof (DDSURFACEDESC)); - ddsd.dwSize = sizeof (DDSURFACEDESC); - IDirectDrawSurface2_Lock (surface, NULL, &ddsd, - DDLOCK_NOSYSLOCK | DDLOCK_WAIT, NULL); - IDirectDrawSurface2_Unlock (surface, NULL); - *stride = ddsd.lPitch; - return ddsd.lpSurface; + DDSURFACEDESC ddsd; + + memset (&ddsd, 0, sizeof (DDSURFACEDESC)); + ddsd.dwSize = sizeof (DDSURFACEDESC); + IDirectDrawSurface2_Lock (surface, NULL, &ddsd, + DDLOCK_NOSYSLOCK | DDLOCK_WAIT, NULL); + IDirectDrawSurface2_Unlock (surface, NULL); + *stride = ddsd.lPitch; + return ddsd.lpSurface; } static void dx_setup_fbuf (vo_instance_t * _instance, uint8_t ** buf, void ** id) { - dx_instance_t * instance = (dx_instance_t *) _instance; - int stride; + dx_instance_t * instance = (dx_instance_t *) _instance; + int stride; - *id = instance->frame[instance->index++] = alloc_frame (instance); - buf[0] = surface_addr (*id, &stride); - buf[1] = NULL; - buf[2] = NULL; + *id = instance->frame[instance->index++] = alloc_frame (instance); + buf[0] = surface_addr (*id, &stride); + buf[1] = NULL; + buf[2] = NULL; } static void dxrgb_draw_frame (dx_instance_t * _instance, uint8_t * const * buf, void * id) { - dx_instance_t * instance = (dx_instance_t *) _instance; - LPDIRECTDRAWSURFACE2 surface = (LPDIRECTDRAWSURFACE2) id; - DDBLTFX ddbltfx; - - check_events (instance); - - hdc = GetDC(instance->window); - SetDIBitsToDevice(hdc, 0, 0, instance->width, instance->height, - 0, 0, 0, instance->height, *buf, (LPBITMAPINFO)lpbirgb, DIB_RGB_COLORS); - - return; - - memset (&ddbltfx, 0, sizeof (DDBLTFX)); - ddbltfx.dwSize = sizeof (DDBLTFX); - ddbltfx.dwDDFX = DDBLTFX_NOTEARING; - if (DDERR_SURFACELOST == - IDirectDrawSurface2_Blt (instance->display, &instance->window_coords, - surface, NULL, DDBLT_WAIT, &ddbltfx)) { - /* restore surface and try again */ - IDirectDrawSurface2_Restore (instance->display); - IDirectDrawSurface2_Blt (instance->display, &instance->window_coords, - surface, NULL, DDBLT_WAIT, &ddbltfx); - } + dx_instance_t * instance = (dx_instance_t *) _instance; + LPDIRECTDRAWSURFACE2 surface = (LPDIRECTDRAWSURFACE2) id; + DDBLTFX ddbltfx; + + check_events (instance); + + hdc = GetDC(instance->window); + SetDIBitsToDevice(hdc, 0, 0, instance->width, instance->height, + 0, 0, 0, instance->height, *buf, (LPBITMAPINFO)lpbirgb, DIB_RGB_COLORS); + + return; + + memset (&ddbltfx, 0, sizeof (DDBLTFX)); + ddbltfx.dwSize = sizeof (DDBLTFX); + ddbltfx.dwDDFX = DDBLTFX_NOTEARING; + if (DDERR_SURFACELOST == + IDirectDrawSurface2_Blt (instance->display, &instance->window_coords, + surface, NULL, DDBLT_WAIT, &ddbltfx)) { + /* restore surface and try again */ + IDirectDrawSurface2_Restore (instance->display); + IDirectDrawSurface2_Blt (instance->display, &instance->window_coords, + surface, NULL, DDBLT_WAIT, &ddbltfx); + } } static vo_instance_t * common_open () { - dx_instance_t * instance; + dx_instance_t * instance; - instance = malloc (sizeof (dx_instance_t)); - if (instance == NULL) - return NULL; + instance = malloc (sizeof (dx_instance_t)); + if (instance == NULL) + return NULL; - memset (instance, 0, sizeof (dx_instance_t)); + memset (instance, 0, sizeof (dx_instance_t)); // instance->vo.setup = setup; // instance->vo.setup_fbuf = setup_fbuf; // instance->vo.set_fbuf = NULL; @@ -788,122 +788,122 @@ static vo_instance_t * common_open () // instance->vo.discard = NULL; // instance->vo.close = NULL; //dx_close; - return (vo_instance_t *) instance; + return (vo_instance_t *) instance; } vo_instance_t * vo_dxrgb_open (void) { - return common_open (); + return common_open (); } vo_instance_t * vo_dx_open (void) { - return common_open (); + return common_open (); } static LPDIRECTDRAWSURFACE2 alloc_overlay (dx_instance_t * instance) { - DDSURFACEDESC ddsd; - LPDIRECTDRAWSURFACE2 surface; - - memset (&ddsd, 0, sizeof (DDSURFACEDESC)); - ddsd.dwSize = sizeof (DDSURFACEDESC); - ddsd.ddpfPixelFormat.dwSize = sizeof (DDPIXELFORMAT); - ddsd.dwFlags = DDSD_HEIGHT | DDSD_WIDTH | DDSD_CAPS; - ddsd.dwHeight = instance->height; - ddsd.dwWidth = instance->width; - ddsd.ddpfPixelFormat.dwFlags = DDPF_FOURCC; - ddsd.ddpfPixelFormat.dwFourCC = FOURCC_YV12; - ddsd.dwFlags |= DDSD_PIXELFORMAT; - ddsd.ddsCaps.dwCaps = DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY; + DDSURFACEDESC ddsd; + LPDIRECTDRAWSURFACE2 surface; + + memset (&ddsd, 0, sizeof (DDSURFACEDESC)); + ddsd.dwSize = sizeof (DDSURFACEDESC); + ddsd.ddpfPixelFormat.dwSize = sizeof (DDPIXELFORMAT); + ddsd.dwFlags = DDSD_HEIGHT | DDSD_WIDTH | DDSD_CAPS; + ddsd.dwHeight = instance->height; + ddsd.dwWidth = instance->width; + ddsd.ddpfPixelFormat.dwFlags = DDPF_FOURCC; + ddsd.ddpfPixelFormat.dwFourCC = FOURCC_YV12; + ddsd.dwFlags |= DDSD_PIXELFORMAT; + ddsd.ddsCaps.dwCaps = DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY; #if USE_OVERLAY_TRIPLE_BUFFERING - ddsd.dwFlags |= DDSD_BACKBUFFERCOUNT; - ddsd.ddsCaps.dwCaps |= DDSCAPS_COMPLEX | DDSCAPS_FLIP; + ddsd.dwFlags |= DDSD_BACKBUFFERCOUNT; + ddsd.ddsCaps.dwCaps |= DDSCAPS_COMPLEX | DDSCAPS_FLIP; #endif - ddsd.dwBackBufferCount = 2; + ddsd.dwBackBufferCount = 2; - surface = alloc_surface (instance, &ddsd); - if (surface == NULL) - fprintf (stderr, "Can not create directDraw frame surface\n"); - return surface; + surface = alloc_surface (instance, &ddsd); + if (surface == NULL) + fprintf (stderr, "Can not create directDraw frame surface\n"); + return surface; } static void copy_yuv_picture (dx_instance_t * instance, uint8_t * const * buf, void * id) { - uint8_t * dest[3]; - int width, i; - - dest[0] = instance->yuv[0]; - dest[1] = instance->yuv[1]; - dest[2] = instance->yuv[2]; - - width = instance->width; - for (i = 0; i < instance->height >> 1; i++) { - memcpy (dest[0], buf[0] + 2 * i * width, width); - dest[0] += instance->stride; - memcpy (dest[0], buf[0] + (2 * i + 1) * width, width); - dest[0] += instance->stride; - memcpy (dest[1], buf[1] + i * (width >> 1), width >> 1); - dest[1] += instance->stride >> 1; - memcpy (dest[2], buf[2] + i * (width >> 1), width >> 1); - dest[2] += instance->stride >> 1; - } + uint8_t * dest[3]; + int width, i; + + dest[0] = instance->yuv[0]; + dest[1] = instance->yuv[1]; + dest[2] = instance->yuv[2]; + + width = instance->width; + for (i = 0; i < instance->height >> 1; i++) { + memcpy (dest[0], buf[0] + 2 * i * width, width); + dest[0] += instance->stride; + memcpy (dest[0], buf[0] + (2 * i + 1) * width, width); + dest[0] += instance->stride; + memcpy (dest[1], buf[1] + i * (width >> 1), width >> 1); + dest[1] += instance->stride >> 1; + memcpy (dest[2], buf[2] + i * (width >> 1), width >> 1); + dest[2] += instance->stride >> 1; + } } static void dx_draw_frame (vo_instance_t * _instance, uint8_t * const * buf, void * id) { - dx_instance_t * instance = (dx_instance_t *) _instance; + dx_instance_t * instance = (dx_instance_t *) _instance; - check_events (instance); + check_events (instance); - copy_yuv_picture (instance, buf, id); + copy_yuv_picture (instance, buf, id); - if (instance->overlay) { - if (DDERR_SURFACELOST == - IDirectDrawSurface2_Flip (instance->overlay, NULL, DDFLIP_WAIT)) { - /* restore surfaces and try again */ - IDirectDrawSurface2_Restore (instance->display); - IDirectDrawSurface2_Restore (instance->overlay); - IDirectDrawSurface2_Flip (instance->overlay, NULL, DDFLIP_WAIT); - } - } + if (instance->overlay) { + if (DDERR_SURFACELOST == + IDirectDrawSurface2_Flip (instance->overlay, NULL, DDFLIP_WAIT)) { + /* restore surfaces and try again */ + IDirectDrawSurface2_Restore (instance->display); + IDirectDrawSurface2_Restore (instance->overlay); + IDirectDrawSurface2_Flip (instance->overlay, NULL, DDFLIP_WAIT); + } + } } static void dx_close (dx_instance_t * _instance) { - dx_instance_t * instance; - int i; + dx_instance_t * instance; + int i; - instance = (dx_instance_t *) _instance; + instance = (dx_instance_t *) _instance; - if (instance->overlay) { - IDirectDrawSurface2_Release (instance->overlay); - instance->overlay = NULL; - } else - for (i = 0; i < 3; i++) { + if (instance->overlay) { + IDirectDrawSurface2_Release (instance->overlay); + instance->overlay = NULL; + } else + for (i = 0; i < 3; i++) { // if (instance->frame[i].p_surface != NULL) // IDirectDrawSurface2_Release (instance->frame[i].p_surface); // instance->frame[i].p_surface = NULL; - } + } - if (instance->clipper != NULL) - IDirectDrawClipper_Release (instance->clipper); + if (instance->clipper != NULL) + IDirectDrawClipper_Release (instance->clipper); - if (instance->display != NULL) - IDirectDrawSurface2_Release (instance->display); + if (instance->display != NULL) + IDirectDrawSurface2_Release (instance->display); - if (instance->ddraw != NULL) - IDirectDraw2_Release (instance->ddraw); + if (instance->ddraw != NULL) + IDirectDraw2_Release (instance->ddraw); - if (instance->hddraw_dll != NULL) - FreeLibrary (instance->hddraw_dll); + if (instance->hddraw_dll != NULL) + FreeLibrary (instance->hddraw_dll); - if (instance->window != NULL) - DestroyWindow (instance->window); + if (instance->window != NULL) + DestroyWindow (instance->window); } #endif @@ -926,87 +926,87 @@ vo_setup_result_t result; void vo_init(int width, int height, char *title) { // width -= 30; - memset(buf1,128,width*height); - memset(buf2,128,width*height); + memset(buf1,128,width*height); + memset(buf2,128,width*height); #ifdef RGB - instance = (dx_instance_t *)vo_dxrgb_open(); - hWind = (HWND)instance; - strcpy(instance->title, title); - dxrgb_setup( instance, width, height, width, height, &result); + instance = (dx_instance_t *)vo_dxrgb_open(); + hWind = (HWND)instance; + strcpy(instance->title, title); + dxrgb_setup( instance, width, height, width, height, &result); // dx_setup_fbuf ( instance, buffer, &result); #else - instance = vo_dx_open(); - strcpy(instance->title, title); - dx_setup( instance, width, height, width, height, &result); + instance = vo_dx_open(); + strcpy(instance->title, title); + dx_setup( instance, width, height, width, height, &result); #endif } void vo_draw(unsigned char * buf) { - int id; + int id; #ifdef RGB // dx_setup_fbuf ( instance, buffer, &result); - memcpy(buffer[0], buf, instance->width*instance->height*3); - dxrgb_draw_frame( instance,buffer , &id); + memcpy(buffer[0], buf, instance->width*instance->height*3); + dxrgb_draw_frame( instance,buffer , &id); #else - buffer[0] = buf; - dx_draw_frame( instance, buffer , &id); + buffer[0] = buf; + dx_draw_frame( instance, buffer , &id); #endif } void vo_refresh() { - if (instance) - check_events (instance); + if (instance) + check_events (instance); } void vo_wait() { - if (instance) - wait_events (instance); + if (instance) + wait_events (instance); } void vo_close() { - if (instance) - dx_close(instance); + if (instance) + dx_close(instance); } int firstTime = 1; void ShowDetails(char *t) { - int l; - l = strlen(t); - TextOut(hdc, 0, 30, t, l); - if (firstTime) { - TextOut(hdc, 0, 30+16, "Press F1 for help", 17); - firstTime = 0; - } - hdc = BeginPaint(instance->window, &ps); - EndPaint(instance->window, &ps); - ReleaseDC(instance->window, hdc); + int l; + l = strlen(t); + TextOut(hdc, 0, 30, t, l); + if (firstTime) { + TextOut(hdc, 0, 30+16, "Press F1 for help", 17); + firstTime = 0; + } + hdc = BeginPaint(instance->window, &ps); + EndPaint(instance->window, &ps); + ReleaseDC(instance->window, hdc); } void ShowHelp(char **ta) { - char *t; - int l; - int i = 0; - while (t = *ta) { - l = strlen(t); - TextOut(hdc, 0, 30+16*i++, t, l); - ta++; - } - hdc = BeginPaint(instance->window, &ps); - EndPaint(instance->window, &ps); - ReleaseDC(instance->window, hdc); + char *t; + int l; + int i = 0; + while (t = *ta) { + l = strlen(t); + TextOut(hdc, 0, 30+16*i++, t, l); + ta++; + } + hdc = BeginPaint(instance->window, &ps); + EndPaint(instance->window, &ps); + ReleaseDC(instance->window, hdc); } @@ -1015,55 +1015,55 @@ void ShowHelp(char **ta) main() { - int r,g,b; + int r,g,b; - /* - double R,G,B; - double Y,U,V; + /* + double R,G,B; + double Y,U,V; - R = 0; - G = 0; - B = 0; + R = 0; + G = 0; + B = 0; - Y = 0.299*R + 0.587*G + 0.114*B; - U = - 0.147*R - 0.289*G + 0.436*B; - V = 0.615*R - 0.515*G - 0.100*B; + Y = 0.299*R + 0.587*G + 0.114*B; + U = - 0.147*R - 0.289*G + 0.436*B; + V = 0.615*R - 0.515*G - 0.100*B; - R = 1; - G = 1; - B = 1; + R = 1; + G = 1; + B = 1; - Y = 0.299*R + 0.587*G + 0.114*B; - U = - 0.147*R - 0.289*G + 0.436*B; - V = 0.615*R - 0.515*G - 0.100*B; - */ + Y = 0.299*R + 0.587*G + 0.114*B; + U = - 0.147*R - 0.289*G + 0.436*B; + V = 0.615*R - 0.515*G - 0.100*B; + */ - vo_init(MAXWIDTH,MAXHEIGHT, "test"); + vo_init(MAXWIDTH,MAXHEIGHT, "test"); // memset(buffer,0,sizeof(buffer)); - for (r = 0 ; r < 255; r++) { - for (g = 0; g < 255; g++) { - for (b=0; b<255; b++) { + for (r = 0 ; r < 255; r++) { + for (g = 0; g < 255; g++) { + for (b=0; b<255; b++) { #ifdef RGB - buffer[0][2*g*MAXWIDTH+2*b] = r; - buffer[0][2*g*MAXWIDTH+2*b+1] = g; - buffer[0][(2*g+1)*MAXWIDTH+2*b] = b; - buffer[0][(2*g+1)*MAXWIDTH+2*b+1] = r; + buffer[0][2*g*MAXWIDTH+2*b] = r; + buffer[0][2*g*MAXWIDTH+2*b+1] = g; + buffer[0][(2*g+1)*MAXWIDTH+2*b] = b; + buffer[0][(2*g+1)*MAXWIDTH+2*b+1] = r; #else - buffer[0][2*g*MAXWIDTH+2*b] = r; - buffer[0][2*g*MAXWIDTH+2*b+1] = r; - buffer[0][(2*g+1)*MAXWIDTH+2*b] = r; - buffer[0][(2*g+1)*MAXWIDTH+2*b+1] = r; - buffer[1][g*400+b] = 128; - buffer[2][g*400+b] = 128; + buffer[0][2*g*MAXWIDTH+2*b] = r; + buffer[0][2*g*MAXWIDTH+2*b+1] = r; + buffer[0][(2*g+1)*MAXWIDTH+2*b] = r; + buffer[0][(2*g+1)*MAXWIDTH+2*b+1] = r; + buffer[1][g*400+b] = 128; + buffer[2][g*400+b] = 128; #endif - } - } - vo_draw(buffer[0]); - } + } + } + vo_draw(buffer[0]); + } } #endif diff --git a/Makefile b/win32/Makefile.win32 similarity index 100% rename from Makefile rename to win32/Makefile.win32