avformat/mvdec: Don't signal success on parse_audio_var() error master
authorJames Almer <jamrial@gmail.com>
Thu, 16 Sep 2021 19:34:03 +0000 (16:34 -0300)
committerJames Almer <jamrial@gmail.com>
Thu, 16 Sep 2021 22:44:32 +0000 (19:44 -0300)
Propagate the error it returned instead.

Signed-off-by: James Almer <jamrial@gmail.com>
825 files changed:
Changelog
Makefile
compat/cuda/cuda_runtime.h
configure
doc/APIchanges
doc/bitstream_filters.texi
doc/demuxers.texi
doc/examples/encode_video.c
doc/examples/qsvdec.c
doc/ffmpeg.texi
doc/ffprobe.xsd
doc/filters.texi
doc/general_contents.texi
doc/git-howto.texi
doc/indevs.texi
doc/muxers.texi
doc/outdevs.texi
fftools/Makefile
fftools/cmdutils.c
fftools/cmdutils.h
fftools/ffmpeg.c
fftools/ffmpeg.h
fftools/ffmpeg_filter.c
fftools/ffmpeg_hw.c
fftools/ffmpeg_opt.c
fftools/ffmpeg_qsv.c [deleted file]
fftools/ffplay.c
fftools/ffprobe.c
libavcodec/Makefile
libavcodec/aac_defines.h
libavcodec/aaccoder.c
libavcodec/aacdec.c
libavcodec/aacdec_fixed.c
libavcodec/aacps.c
libavcodec/aarch64/h264dsp_init_aarch64.c
libavcodec/aarch64/h264dsp_neon.S
libavcodec/aarch64/h264pred_init.c
libavcodec/aarch64/h264pred_neon.S
libavcodec/aarch64/neon.S
libavcodec/aarch64/vp9lpf_16bpp_neon.S
libavcodec/ac3dec_fixed.c
libavcodec/ac3enc_fixed.c
libavcodec/acelp_vectors.c
libavcodec/allcodecs.c
libavcodec/apedec.c
libavcodec/argo.c
libavcodec/arm/h264dsp_init_arm.c
libavcodec/arm/hevcdsp_qpel_neon.S
libavcodec/ass_split.c
libavcodec/ass_split.h
libavcodec/av1_frame_merge_bsf.c
libavcodec/av1dec.c
libavcodec/avcodec.c
libavcodec/avcodec.h
libavcodec/avpacket.c
libavcodec/bsf.c
libavcodec/bsf.h
libavcodec/cbs.c
libavcodec/cbs.h
libavcodec/cbs_bsf.c
libavcodec/cbs_h2645.c
libavcodec/cbs_h265.h
libavcodec/cbs_h265_syntax_template.c
libavcodec/codec.h
libavcodec/codec_desc.c
libavcodec/codec_id.h
libavcodec/dcaenc.c
libavcodec/dnxhddec.c
libavcodec/dxva2_av1.c
libavcodec/elbg.c
libavcodec/exr.c
libavcodec/faxcompr.c
libavcodec/fft-internal.h
libavcodec/fft.h
libavcodec/fft_fixed_32.c
libavcodec/fft_float.c
libavcodec/fft_template.c
libavcodec/frame_thread_encoder.c
libavcodec/frame_thread_encoder.h
libavcodec/h263dec.c
libavcodec/h264_levels.h
libavcodec/h264_parser.c
libavcodec/h264_picture.c
libavcodec/h264_sei.c
libavcodec/h264_slice.c
libavcodec/h264dec.c
libavcodec/h264dec.h
libavcodec/h264dsp.h
libavcodec/h264idct.h
libavcodec/h264idct_template.c
libavcodec/h265_profile_level.h
libavcodec/h274.c [new file with mode: 0644]
libavcodec/h274.h [new file with mode: 0644]
libavcodec/hevc_sei.c
libavcodec/hevc_sei.h
libavcodec/hevcdec.c
libavcodec/huffman.c
libavcodec/huffman.h
libavcodec/iirfilter.c
libavcodec/iirfilter.h
libavcodec/internal.h
libavcodec/interplayacm.c
libavcodec/jpeg2000.c
libavcodec/jpeg2000.h
libavcodec/jpeg2000_parser.c
libavcodec/jpeg2000dec.c
libavcodec/libaomenc.c
libavcodec/libdav1d.c
libavcodec/libvpxenc.c
libavcodec/libx264.c
libavcodec/libx265.c
libavcodec/mdct_fixed_32.c
libavcodec/mdct_float.c
libavcodec/mdct_template.c
libavcodec/mfenc.c
libavcodec/mips/constants.h
libavcodec/mips/h264dsp_mips.h
libavcodec/mips/h264dsp_mmi.c
libavcodec/mips/h264idct_msa.c
libavcodec/mjpegbdec.c
libavcodec/mjpegdec.c
libavcodec/mlp.h
libavcodec/mlpdec.c
libavcodec/mlpenc.c
libavcodec/movtextenc.c
libavcodec/mpeg12dec.c
libavcodec/mqc.h
libavcodec/mqcenc.c
libavcodec/noise_bsf.c
libavcodec/nvenc.c
libavcodec/nvenc.h
libavcodec/nvenc_h264.c
libavcodec/nvenc_hevc.c
libavcodec/omx.c
libavcodec/options_table.h
libavcodec/packet.h
libavcodec/parser.c
libavcodec/pictordec.c
libavcodec/pnm_parser.c
libavcodec/ppc/h264dsp.c
libavcodec/pthread.c
libavcodec/pthread_frame.c
libavcodec/pthread_internal.h
libavcodec/qsv.c
libavcodec/qsv_internal.h
libavcodec/qsvdec.c
libavcodec/qsvenc.c
libavcodec/qsvenc.h
libavcodec/sbrdsp_fixed.c
libavcodec/siren.c
libavcodec/smc.c
libavcodec/smcenc.c [new file with mode: 0644]
libavcodec/snow_dwt.c
libavcodec/snow_dwt.h
libavcodec/srtenc.c
libavcodec/tests/fft-fixed32.c
libavcodec/tests/fft.c
libavcodec/tiff_common.c
libavcodec/trace_headers_bsf.c
libavcodec/ttmlenc.c
libavcodec/utils.c
libavcodec/vc1dec.c
libavcodec/vdpau.c
libavcodec/version.h
libavcodec/videotoolboxenc.c
libavcodec/vp6.c
libavcodec/vp9.c
libavcodec/vp9dec.h
libavcodec/webp.c
libavcodec/webvttenc.c
libavcodec/wma.c
libavcodec/wma.h
libavcodec/wmadec.c
libavcodec/wmaprodec.c
libavcodec/x86/cabac.h
libavcodec/x86/h264dsp_init.c
libavcodec/xpmdec.c
libavdevice/decklink_common.cpp
libavdevice/decklink_common.h
libavdevice/decklink_common_c.h
libavdevice/decklink_dec_c.c
libavdevice/decklink_enc.cpp
libavdevice/decklink_enc_c.c
libavdevice/lavfi.c
libavdevice/version.h
libavfilter/Makefile
libavfilter/aeval.c
libavfilter/af_acontrast.c
libavfilter/af_acopy.c
libavfilter/af_acrossover.c
libavfilter/af_acrusher.c
libavfilter/af_adeclick.c
libavfilter/af_adecorrelate.c [new file with mode: 0644]
libavfilter/af_adelay.c
libavfilter/af_adenorm.c
libavfilter/af_aderivative.c
libavfilter/af_aecho.c
libavfilter/af_aemphasis.c
libavfilter/af_aexciter.c
libavfilter/af_afade.c
libavfilter/af_afftdn.c
libavfilter/af_afftfilt.c
libavfilter/af_afir.c
libavfilter/af_aformat.c
libavfilter/af_afreqshift.c
libavfilter/af_afwtdn.c
libavfilter/af_agate.c
libavfilter/af_aiir.c
libavfilter/af_alimiter.c
libavfilter/af_amerge.c
libavfilter/af_amix.c
libavfilter/af_amultiply.c
libavfilter/af_anequalizer.c
libavfilter/af_anlmdn.c
libavfilter/af_anlms.c
libavfilter/af_anull.c
libavfilter/af_apad.c
libavfilter/af_aphaser.c
libavfilter/af_apsyclip.c [new file with mode: 0644]
libavfilter/af_apulsator.c
libavfilter/af_aresample.c
libavfilter/af_arnndn.c
libavfilter/af_asetnsamples.c
libavfilter/af_asetrate.c
libavfilter/af_ashowinfo.c
libavfilter/af_asoftclip.c
libavfilter/af_asr.c
libavfilter/af_astats.c
libavfilter/af_asubboost.c
libavfilter/af_asupercut.c
libavfilter/af_atempo.c
libavfilter/af_atilt.c [new file with mode: 0644]
libavfilter/af_axcorrelate.c
libavfilter/af_biquads.c
libavfilter/af_bs2b.c
libavfilter/af_channelmap.c
libavfilter/af_channelsplit.c
libavfilter/af_chorus.c
libavfilter/af_compand.c
libavfilter/af_compensationdelay.c
libavfilter/af_crossfeed.c
libavfilter/af_crystalizer.c
libavfilter/af_dcshift.c
libavfilter/af_deesser.c
libavfilter/af_drmeter.c
libavfilter/af_dynaudnorm.c
libavfilter/af_earwax.c
libavfilter/af_extrastereo.c
libavfilter/af_firequalizer.c
libavfilter/af_flanger.c
libavfilter/af_haas.c
libavfilter/af_hdcd.c
libavfilter/af_headphone.c
libavfilter/af_join.c
libavfilter/af_ladspa.c
libavfilter/af_loudnorm.c
libavfilter/af_lv2.c
libavfilter/af_mcompand.c
libavfilter/af_pan.c
libavfilter/af_replaygain.c
libavfilter/af_rubberband.c
libavfilter/af_sidechaincompress.c
libavfilter/af_silencedetect.c
libavfilter/af_silenceremove.c
libavfilter/af_sofalizer.c
libavfilter/af_speechnorm.c
libavfilter/af_stereotools.c
libavfilter/af_stereowiden.c
libavfilter/af_superequalizer.c
libavfilter/af_surround.c
libavfilter/af_tremolo.c
libavfilter/af_vibrato.c
libavfilter/af_volume.c
libavfilter/af_volumedetect.c
libavfilter/allfilters.c
libavfilter/asink_anullsink.c
libavfilter/asrc_afirsrc.c
libavfilter/asrc_anoisesrc.c
libavfilter/asrc_anullsrc.c
libavfilter/asrc_flite.c
libavfilter/asrc_hilbert.c
libavfilter/asrc_sinc.c
libavfilter/asrc_sine.c
libavfilter/audio.c
libavfilter/avf_abitscope.c
libavfilter/avf_ahistogram.c
libavfilter/avf_aphasemeter.c
libavfilter/avf_avectorscope.c
libavfilter/avf_concat.c
libavfilter/avf_showcqt.c
libavfilter/avf_showfreqs.c
libavfilter/avf_showspatial.c
libavfilter/avf_showspectrum.c
libavfilter/avf_showvolume.c
libavfilter/avf_showwaves.c
libavfilter/avfilter.c
libavfilter/avfilter.h
libavfilter/avfiltergraph.c
libavfilter/buffersink.c
libavfilter/buffersrc.c
libavfilter/dnn/dnn_backend_common.c
libavfilter/dnn/dnn_backend_common.h
libavfilter/dnn/dnn_backend_native.c
libavfilter/dnn/dnn_backend_native.h
libavfilter/dnn/dnn_backend_openvino.c
libavfilter/dnn/dnn_backend_openvino.h
libavfilter/dnn/dnn_backend_tf.c
libavfilter/dnn/dnn_backend_tf.h
libavfilter/dnn/dnn_interface.c
libavfilter/dnn/queue.h
libavfilter/dnn_filter_common.c
libavfilter/dnn_filter_common.h
libavfilter/dnn_interface.h
libavfilter/f_bench.c
libavfilter/f_cue.c
libavfilter/f_drawgraph.c
libavfilter/f_ebur128.c
libavfilter/f_graphmonitor.c
libavfilter/f_interleave.c
libavfilter/f_loop.c
libavfilter/f_metadata.c
libavfilter/f_perms.c
libavfilter/f_realtime.c
libavfilter/f_reverse.c
libavfilter/f_segment.c [new file with mode: 0644]
libavfilter/f_select.c
libavfilter/f_sendcmd.c
libavfilter/f_sidedata.c
libavfilter/f_streamselect.c
libavfilter/f_zmq.c
libavfilter/fifo.c
libavfilter/formats.c
libavfilter/formats.h
libavfilter/gblur.h
libavfilter/graphdump.c
libavfilter/internal.h
libavfilter/opencl.c
libavfilter/qp_table.h
libavfilter/qsvvpp.c
libavfilter/setpts.c
libavfilter/settb.c
libavfilter/signature_lookup.c
libavfilter/split.c
libavfilter/src_movie.c
libavfilter/trim.c
libavfilter/vaf_spectrumsynth.c
libavfilter/version.h
libavfilter/vf_addroi.c
libavfilter/vf_alphamerge.c
libavfilter/vf_amplify.c
libavfilter/vf_aspect.c
libavfilter/vf_atadenoise.c
libavfilter/vf_avgblur.c
libavfilter/vf_avgblur_opencl.c
libavfilter/vf_avgblur_vulkan.c
libavfilter/vf_bbox.c
libavfilter/vf_bilateral.c
libavfilter/vf_bitplanenoise.c
libavfilter/vf_blackdetect.c
libavfilter/vf_blackframe.c
libavfilter/vf_blend.c
libavfilter/vf_bm3d.c
libavfilter/vf_boxblur.c
libavfilter/vf_bwdif.c
libavfilter/vf_cas.c
libavfilter/vf_chromaber_vulkan.c
libavfilter/vf_chromakey.c
libavfilter/vf_chromanr.c
libavfilter/vf_chromashift.c
libavfilter/vf_ciescope.c
libavfilter/vf_codecview.c
libavfilter/vf_colorbalance.c
libavfilter/vf_colorchannelmixer.c
libavfilter/vf_colorconstancy.c
libavfilter/vf_colorcontrast.c
libavfilter/vf_colorcorrect.c
libavfilter/vf_colorize.c
libavfilter/vf_colorkey.c
libavfilter/vf_colorkey_opencl.c
libavfilter/vf_colorlevels.c
libavfilter/vf_colormatrix.c
libavfilter/vf_colorspace.c
libavfilter/vf_colortemperature.c
libavfilter/vf_convolution.c
libavfilter/vf_convolution_opencl.c
libavfilter/vf_convolve.c
libavfilter/vf_copy.c
libavfilter/vf_coreimage.m
libavfilter/vf_cover_rect.c
libavfilter/vf_crop.c
libavfilter/vf_cropdetect.c
libavfilter/vf_curves.c
libavfilter/vf_datascope.c
libavfilter/vf_dblur.c
libavfilter/vf_dctdnoiz.c
libavfilter/vf_deband.c
libavfilter/vf_deblock.c
libavfilter/vf_decimate.c
libavfilter/vf_dedot.c
libavfilter/vf_deflicker.c
libavfilter/vf_deinterlace_qsv.c
libavfilter/vf_deinterlace_vaapi.c
libavfilter/vf_dejudder.c
libavfilter/vf_delogo.c
libavfilter/vf_derain.c
libavfilter/vf_deshake.c
libavfilter/vf_deshake_opencl.c
libavfilter/vf_despill.c
libavfilter/vf_detelecine.c
libavfilter/vf_displace.c
libavfilter/vf_dnn_classify.c
libavfilter/vf_dnn_detect.c
libavfilter/vf_dnn_processing.c
libavfilter/vf_drawbox.c
libavfilter/vf_drawtext.c
libavfilter/vf_edgedetect.c
libavfilter/vf_elbg.c
libavfilter/vf_entropy.c
libavfilter/vf_epx.c
libavfilter/vf_eq.c
libavfilter/vf_estdif.c
libavfilter/vf_exposure.c
libavfilter/vf_extractplanes.c
libavfilter/vf_fade.c
libavfilter/vf_fftdnoiz.c
libavfilter/vf_fftfilt.c
libavfilter/vf_field.c
libavfilter/vf_fieldhint.c
libavfilter/vf_fieldmatch.c
libavfilter/vf_fieldorder.c
libavfilter/vf_fillborders.c
libavfilter/vf_find_rect.c
libavfilter/vf_floodfill.c
libavfilter/vf_format.c
libavfilter/vf_fps.c
libavfilter/vf_framepack.c
libavfilter/vf_framerate.c
libavfilter/vf_framestep.c
libavfilter/vf_freezedetect.c
libavfilter/vf_freezeframes.c
libavfilter/vf_frei0r.c
libavfilter/vf_fspp.c
libavfilter/vf_gblur.c
libavfilter/vf_geq.c
libavfilter/vf_gradfun.c
libavfilter/vf_grayworld.c [new file with mode: 0644]
libavfilter/vf_guided.c
libavfilter/vf_hflip.c
libavfilter/vf_histeq.c
libavfilter/vf_histogram.c
libavfilter/vf_hqdn3d.c
libavfilter/vf_hqx.c
libavfilter/vf_hsvkey.c [new file with mode: 0644]
libavfilter/vf_hue.c
libavfilter/vf_hwdownload.c
libavfilter/vf_hwmap.c
libavfilter/vf_hwupload.c
libavfilter/vf_hwupload_cuda.c
libavfilter/vf_hysteresis.c
libavfilter/vf_identity.c
libavfilter/vf_idet.c
libavfilter/vf_il.c
libavfilter/vf_kerndeint.c
libavfilter/vf_lagfun.c
libavfilter/vf_lenscorrection.c
libavfilter/vf_lensfun.c
libavfilter/vf_libopencv.c
libavfilter/vf_libvmaf.c
libavfilter/vf_limiter.c
libavfilter/vf_lumakey.c
libavfilter/vf_lut.c
libavfilter/vf_lut2.c
libavfilter/vf_lut3d.c
libavfilter/vf_maskedclamp.c
libavfilter/vf_maskedmerge.c
libavfilter/vf_maskedminmax.c
libavfilter/vf_maskedthreshold.c
libavfilter/vf_maskfun.c
libavfilter/vf_mcdeint.c
libavfilter/vf_median.c
libavfilter/vf_mergeplanes.c
libavfilter/vf_mestimate.c
libavfilter/vf_midequalizer.c
libavfilter/vf_minterpolate.c
libavfilter/vf_misc_vaapi.c
libavfilter/vf_mix.c
libavfilter/vf_monochrome.c
libavfilter/vf_mpdecimate.c
libavfilter/vf_neighbor.c
libavfilter/vf_neighbor_opencl.c
libavfilter/vf_nlmeans.c
libavfilter/vf_nlmeans_opencl.c
libavfilter/vf_nnedi.c
libavfilter/vf_noise.c
libavfilter/vf_normalize.c
libavfilter/vf_null.c
libavfilter/vf_ocr.c
libavfilter/vf_overlay.c
libavfilter/vf_overlay_cuda.c
libavfilter/vf_overlay_opencl.c
libavfilter/vf_overlay_qsv.c
libavfilter/vf_overlay_vulkan.c
libavfilter/vf_owdenoise.c
libavfilter/vf_pad.c
libavfilter/vf_pad_opencl.c
libavfilter/vf_palettegen.c
libavfilter/vf_paletteuse.c
libavfilter/vf_perspective.c
libavfilter/vf_phase.c
libavfilter/vf_photosensitivity.c
libavfilter/vf_pixdesctest.c
libavfilter/vf_pp.c
libavfilter/vf_pp7.c
libavfilter/vf_premultiply.c
libavfilter/vf_procamp_vaapi.c
libavfilter/vf_program_opencl.c
libavfilter/vf_pseudocolor.c
libavfilter/vf_psnr.c
libavfilter/vf_pullup.c
libavfilter/vf_qp.c
libavfilter/vf_random.c
libavfilter/vf_readeia608.c
libavfilter/vf_readvitc.c
libavfilter/vf_remap.c
libavfilter/vf_removegrain.c
libavfilter/vf_removelogo.c
libavfilter/vf_repeatfields.c
libavfilter/vf_rotate.c
libavfilter/vf_sab.c
libavfilter/vf_scale.c
libavfilter/vf_scale_cuda.c
libavfilter/vf_scale_npp.c
libavfilter/vf_scale_qsv.c
libavfilter/vf_scale_vaapi.c
libavfilter/vf_scale_vulkan.c
libavfilter/vf_scdet.c
libavfilter/vf_scroll.c
libavfilter/vf_selectivecolor.c
libavfilter/vf_separatefields.c
libavfilter/vf_setparams.c
libavfilter/vf_shear.c
libavfilter/vf_showinfo.c
libavfilter/vf_showpalette.c
libavfilter/vf_shuffleframes.c
libavfilter/vf_shufflepixels.c
libavfilter/vf_shuffleplanes.c
libavfilter/vf_signalstats.c
libavfilter/vf_signature.c
libavfilter/vf_smartblur.c
libavfilter/vf_spp.c
libavfilter/vf_sr.c
libavfilter/vf_ssim.c
libavfilter/vf_stack.c
libavfilter/vf_stereo3d.c
libavfilter/vf_subtitles.c
libavfilter/vf_super2xsai.c
libavfilter/vf_swaprect.c
libavfilter/vf_swapuv.c
libavfilter/vf_telecine.c
libavfilter/vf_threshold.c
libavfilter/vf_thumbnail.c
libavfilter/vf_thumbnail_cuda.c
libavfilter/vf_tile.c
libavfilter/vf_tinterlace.c
libavfilter/vf_tmidequalizer.c
libavfilter/vf_tonemap.c
libavfilter/vf_tonemap_opencl.c
libavfilter/vf_tonemap_vaapi.c
libavfilter/vf_tpad.c
libavfilter/vf_transpose.c
libavfilter/vf_transpose_npp.c
libavfilter/vf_transpose_opencl.c
libavfilter/vf_transpose_vaapi.c
libavfilter/vf_unsharp.c
libavfilter/vf_unsharp_opencl.c
libavfilter/vf_untile.c
libavfilter/vf_uspp.c
libavfilter/vf_v360.c
libavfilter/vf_vaguedenoiser.c
libavfilter/vf_vectorscope.c
libavfilter/vf_vflip.c
libavfilter/vf_vfrdet.c
libavfilter/vf_vibrance.c
libavfilter/vf_vidstabdetect.c
libavfilter/vf_vidstabtransform.c
libavfilter/vf_vif.c
libavfilter/vf_vignette.c
libavfilter/vf_vmafmotion.c
libavfilter/vf_vpp_qsv.c
libavfilter/vf_w3fdif.c
libavfilter/vf_waveform.c
libavfilter/vf_weave.c
libavfilter/vf_xbr.c
libavfilter/vf_xfade.c
libavfilter/vf_xfade_opencl.c
libavfilter/vf_xmedian.c
libavfilter/vf_yadif.c
libavfilter/vf_yadif_cuda.c
libavfilter/vf_yaepblur.c
libavfilter/vf_zoompan.c
libavfilter/vf_zscale.c
libavfilter/video.c
libavfilter/vif.h [deleted file]
libavfilter/vsink_nullsink.c
libavfilter/vsrc_cellauto.c
libavfilter/vsrc_gradients.c
libavfilter/vsrc_life.c
libavfilter/vsrc_mandelbrot.c
libavfilter/vsrc_mptestsrc.c
libavfilter/vsrc_sierpinski.c
libavfilter/vsrc_testsrc.c
libavfilter/vulkan.c
libavfilter/x86/vf_gblur.asm
libavfilter/x86/vf_gblur_init.c
libavformat/Makefile
libavformat/aacdec.c
libavformat/aaxdec.c
libavformat/act.c
libavformat/adtsenc.c
libavformat/aiffdec.c
libavformat/allformats.c
libavformat/asfdec_f.c
libavformat/asfenc.c
libavformat/av1.c
libavformat/av1dec.c
libavformat/avidec.c
libavformat/avio.h
libavformat/avio_internal.h
libavformat/aviobuf.c
libavformat/bfi.c
libavformat/cafdec.c
libavformat/concatdec.c
libavformat/crcenc.c
libavformat/dashdec.c
libavformat/dhav.c
libavformat/dsfdec.c
libavformat/dsicin.c
libavformat/dv.c
libavformat/fifo.c
libavformat/file.c
libavformat/flac_picture.c
libavformat/flac_picture.h
libavformat/flacdec.c
libavformat/hls.c
libavformat/hlsenc.c
libavformat/id3v2.c
libavformat/ilbc.c
libavformat/internal.h
libavformat/isom.h
libavformat/isom_tags.c
libavformat/jacosubdec.c
libavformat/kvag.c
libavformat/matroskadec.c
libavformat/matroskaenc.c
libavformat/mlpdec.c
libavformat/mmst.c
libavformat/mov.c
libavformat/mov_chan.c
libavformat/mov_chan.h
libavformat/movenc.c
libavformat/movenc.h
libavformat/movenc_ttml.c [new file with mode: 0644]
libavformat/movenc_ttml.h [new file with mode: 0644]
libavformat/mp3dec.c
libavformat/mpc8.c
libavformat/mpegts.c
libavformat/mpjpegdec.c
libavformat/mux.c
libavformat/mvdec.c
libavformat/mxf.h
libavformat/mxfdec.c
libavformat/mxfenc.c
libavformat/nuv.c
libavformat/oggdec.c
libavformat/oggdec.h
libavformat/oggenc.c
libavformat/oggparsevorbis.c
libavformat/paf.c
libavformat/pva.c
libavformat/rawdec.c
libavformat/rawdec.h
libavformat/rawenc.c
libavformat/rdt.c
libavformat/riff.c
libavformat/riffdec.c
libavformat/rmdec.c
libavformat/rtpdec.c
libavformat/rtpdec.h
libavformat/rtpdec_asf.c
libavformat/rtpdec_qt.c
libavformat/rtsp.c
libavformat/sapdec.c
libavformat/sbgdec.c
libavformat/segment.c
libavformat/subtitles.c
libavformat/subtitles.h
libavformat/thp.c
libavformat/ttmlenc.c
libavformat/ttmlenc.h [new file with mode: 0644]
libavformat/utils.c
libavformat/version.h
libavformat/vividas.c
libavformat/vorbiscomment.c
libavformat/wavdec.c
libavformat/wtvdec.c
libavformat/yuv4mpegdec.c
libavformat/yuv4mpegenc.c
libavutil/Makefile
libavutil/film_grain_params.h
libavutil/hwcontext_d3d11va.c
libavutil/hwcontext_d3d11va.h
libavutil/hwcontext_qsv.c
libavutil/hwcontext_vulkan.c
libavutil/imgutils.c
libavutil/imgutils.h
libavutil/internal.h
libavutil/log.h
libavutil/mem.c
libavutil/mem.h
libavutil/opt.h
libavutil/slicethread.c
libavutil/tx.c
libavutil/version.h
libswscale/options.c
libswscale/swscale.c
libswscale/swscale.h
libswscale/swscale_internal.h
libswscale/swscale_unscaled.c
libswscale/utils.c
libswscale/version.h
tests/Makefile
tests/checkasm/checkasm.c
tests/checkasm/checkasm.h
tests/checkasm/hevc_pel.c
tests/checkasm/vf_gblur.c
tests/extended.ffconcat
tests/fate-run.sh
tests/fate/ac3.mak
tests/fate/checkasm.mak
tests/fate/dca.mak
tests/fate/filter-audio.mak
tests/fate/filter-video.mak
tests/fate/libswscale.mak
tests/fate/matroska.mak
tests/fate/mov.mak
tests/fate/pixfmt.mak
tests/fate/truehd.mak
tests/fate/wavpack.mak
tests/fate/wma.mak
tests/ref/fate/aac-autobsf-adtstoasc
tests/ref/fate/binsub-mksenc
tests/ref/fate/concat-demuxer-extended-lavf-mxf
tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10
tests/ref/fate/concat-demuxer-simple1-lavf-mxf
tests/ref/fate/concat-demuxer-simple1-lavf-mxf_d10
tests/ref/fate/concat-demuxer-simple2-lavf-ts
tests/ref/fate/exif-image-embedded
tests/ref/fate/exif-image-jpg
tests/ref/fate/exif-image-tiff
tests/ref/fate/exif-image-webp
tests/ref/fate/ffprobe_compact
tests/ref/fate/ffprobe_csv
tests/ref/fate/ffprobe_default
tests/ref/fate/ffprobe_flat
tests/ref/fate/ffprobe_ini
tests/ref/fate/ffprobe_json
tests/ref/fate/ffprobe_xml
tests/ref/fate/ffprobe_xsd
tests/ref/fate/filter-metadata-avf-aphase-meter-mono
tests/ref/fate/filter-metadata-avf-aphase-meter-out-of-phase
tests/ref/fate/filter-metadata-cropdetect
tests/ref/fate/filter-metadata-ebur128
tests/ref/fate/filter-metadata-freezedetect
tests/ref/fate/filter-metadata-readvitc-def
tests/ref/fate/filter-metadata-readvitc-thr
tests/ref/fate/filter-metadata-scdet
tests/ref/fate/filter-metadata-scenedetect
tests/ref/fate/filter-metadata-signalstats-yuv420p
tests/ref/fate/filter-metadata-signalstats-yuv420p10
tests/ref/fate/filter-metadata-silencedetect
tests/ref/fate/filter-scale2ref_keep_aspect
tests/ref/fate/filter-silenceremove
tests/ref/fate/flcl1905
tests/ref/fate/flv-demux
tests/ref/fate/gaplessenc-itunes-to-ipod-aac
tests/ref/fate/gaplessenc-pcm-to-mov-aac
tests/ref/fate/gaplessinfo-itunes1
tests/ref/fate/gaplessinfo-itunes2
tests/ref/fate/h264-dts_5frames
tests/ref/fate/hapqa-extract-nosnappy-to-hapalphaonly-mov
tests/ref/fate/hapqa-extract-nosnappy-to-hapq-mov
tests/ref/fate/hls-fmp4_ac3
tests/ref/fate/matroska-flac-extradata-update
tests/ref/fate/matroska-h264-remux
tests/ref/fate/matroska-mastering-display-metadata
tests/ref/fate/mov-mp4-ttml-dfxp [new file with mode: 0644]
tests/ref/fate/mov-mp4-ttml-stpp [new file with mode: 0644]
tests/ref/fate/mov-zombie
tests/ref/fate/mxf-probe-applehdr10
tests/ref/fate/mxf-probe-d10
tests/ref/fate/mxf-probe-dnxhd
tests/ref/fate/mxf-probe-dv25
tests/ref/fate/png-side-data
tests/ref/fate/source
tests/ref/fate/sub-cc
tests/ref/fate/sub-cc-realtime
tests/ref/fate/ts-demux
tests/ref/fate/ts-small-demux
tests/ref/fate/webm-dash-chapters
tests/ref/lavf-fate/av1.mkv
tests/ref/lavf/mka
tests/ref/lavf/mkv
tests/ref/lavf/mkv_attachment
tests/ref/pixfmt/xyz12le [new file with mode: 0644]
tests/ref/seek/lavf-mkv
tests/simple1.ffconcat
tests/simple2.ffconcat
tools/Makefile
tools/decode_simple.c [new file with mode: 0644]
tools/decode_simple.h [new file with mode: 0644]
tools/dvd2concat
tools/scale_slice_test.c [new file with mode: 0644]
tools/target_bsf_fuzzer.c
tools/target_dec_fuzzer.c
tools/venc_data_dump.c

index 1037688..d0b1a97 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -9,6 +9,17 @@ version <next>:
 - Argonaut Games CVG muxer
 - Concatf protocol
 - afwtdn audio filter
+- audio and video segment filters
+- Apple Graphics (SMC) encoder
+- hsvkey and hsvhold video filters
+- adecorrelate audio filter
+- atilt audio filter
+- grayworld video filter
+- AV1 Low overhead bitstream format muxer
+- swscale slice threading
+- MSN Siren decoder
+- scharr video filter
+- apsyclip audio filter
 
 
 version 4.4:
index 1e3da62..26c9107 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -64,6 +64,8 @@ tools/target_io_dem_fuzzer$(EXESUF): tools/target_io_dem_fuzzer.o $(FF_DEP_LIBS)
 
 tools/enum_options$(EXESUF): ELIBS = $(FF_EXTRALIBS)
 tools/enum_options$(EXESUF): $(FF_DEP_LIBS)
+tools/scale_slice_test$(EXESUF): $(FF_DEP_LIBS)
+tools/scale_slice_test$(EXESUF): ELIBS = $(FF_EXTRALIBS)
 tools/sofa2wavs$(EXESUF): ELIBS = $(FF_EXTRALIBS)
 tools/uncoded_frame$(EXESUF): $(FF_DEP_LIBS)
 tools/uncoded_frame$(EXESUF): ELIBS = $(FF_EXTRALIBS)
index c5450b2..30cd085 100644 (file)
@@ -184,5 +184,6 @@ static inline __device__ double fabs(double a) { return __builtin_fabs(a); }
 
 static inline __device__ float __sinf(float a) { return __nvvm_sin_approx_f(a); }
 static inline __device__ float __cosf(float a) { return __nvvm_cos_approx_f(a); }
+static inline __device__ float __expf(float a) { return __nvvm_ex2_approx_f(a * (float)__builtin_log2(__builtin_exp(1))); }
 
 #endif /* COMPAT_CUDA_CUDA_RUNTIME_H */
index b61a189..7ac2312 100755 (executable)
--- a/configure
+++ b/configure
@@ -1765,7 +1765,6 @@ EXTERNAL_LIBRARY_GPL_LIST="
 EXTERNAL_LIBRARY_NONFREE_LIST="
     decklink
     libfdk_aac
-    openssl
     libtls
 "
 
@@ -1857,6 +1856,7 @@ EXTERNAL_LIBRARY_LIST="
     mediacodec
     openal
     opengl
+    openssl
     pocketsphinx
     vapoursynth
 "
@@ -3388,6 +3388,7 @@ mxf_opatom_muxer_select="mxf_muxer"
 nut_muxer_select="riffenc"
 nuv_demuxer_select="riffdec"
 obu_demuxer_select="av1_frame_merge_bsf av1_parser"
+obu_muxer_select="av1_metadata_bsf"
 oga_muxer_select="ogg_muxer"
 ogg_demuxer_select="dirac_parse"
 ogv_muxer_select="ogg_muxer"
@@ -3542,14 +3543,11 @@ libzmq_protocol_deps="libzmq"
 libzmq_protocol_select="network"
 
 # filters
-afftfilt_filter_deps="avcodec"
-afftfilt_filter_select="fft"
 afir_filter_deps="avcodec"
 afir_filter_select="rdft"
 ametadata_filter_deps="avformat"
 amovie_filter_deps="avcodec avformat"
 aresample_filter_deps="swresample"
-asoftclip_filter_deps="swresample"
 asr_filter_deps="pocketsphinx"
 ass_filter_deps="libass"
 atempo_filter_deps="avcodec"
@@ -3567,16 +3565,12 @@ chromaber_vulkan_filter_deps="vulkan_lib libglslang"
 colorkey_opencl_filter_deps="opencl"
 colormatrix_filter_deps="gpl"
 convolution_opencl_filter_deps="opencl"
-convolve_filter_deps="avcodec"
-convolve_filter_select="fft"
 coreimage_filter_deps="coreimage appkit"
 coreimage_filter_extralibs="-framework OpenGL"
 coreimagesrc_filter_deps="coreimage appkit"
 coreimagesrc_filter_extralibs="-framework OpenGL"
 cover_rect_filter_deps="avcodec avformat gpl"
 cropdetect_filter_deps="gpl"
-deconvolve_filter_deps="avcodec"
-deconvolve_filter_select="fft"
 deinterlace_qsv_filter_deps="libmfx"
 deinterlace_vaapi_filter_deps="vaapi"
 delogo_filter_deps="gpl"
@@ -3603,8 +3597,9 @@ firequalizer_filter_select="rdft"
 flite_filter_deps="libflite"
 framerate_filter_select="scene_sad"
 freezedetect_filter_select="scene_sad"
-frei0r_filter_deps="frei0r libdl"
-frei0r_src_filter_deps="frei0r libdl"
+frei0r_deps_any="libdl LoadLibrary"
+frei0r_filter_deps="frei0r"
+frei0r_src_filter_deps="frei0r"
 fspp_filter_deps="gpl"
 histeq_filter_deps="gpl"
 hqdn3d_filter_deps="gpl"
@@ -3654,8 +3649,6 @@ select_filter_select="scene_sad"
 sharpness_vaapi_filter_deps="vaapi"
 showcqt_filter_deps="avformat swscale"
 showcqt_filter_suggest="libfontconfig libfreetype"
-showfreqs_filter_deps="avcodec"
-showfreqs_filter_select="fft"
 showspatial_filter_deps="avcodec"
 showspatial_filter_select="fft"
 signature_filter_deps="gpl avcodec avformat"
@@ -3664,8 +3657,6 @@ sinc_filter_select="rdft"
 smartblur_filter_deps="gpl swscale"
 sobel_opencl_filter_deps="opencl"
 sofalizer_filter_deps="libmysofa"
-spectrumsynth_filter_deps="avcodec"
-spectrumsynth_filter_select="fft"
 spp_filter_deps="gpl avcodec"
 spp_filter_select="fft idctdsp fdctdsp me_cmp pixblockdsp"
 sr_filter_deps="avformat swscale"
@@ -3735,7 +3726,6 @@ cws2fws_extralibs="zlib_extralibs"
 # libraries, in any order
 avcodec_deps="avutil"
 avcodec_suggest="libm"
-avcodec_select="null_bsf"
 avdevice_deps="avformat avcodec avutil"
 avdevice_suggest="libm"
 avfilter_deps="avutil"
@@ -5953,7 +5943,7 @@ elif enabled mips; then
     enabled loongson3 && check_inline_asm loongson3 '"gsldxc1 $f0, 0($2, $3)"' '-mloongson-ext' && append MMIFLAGS '-mloongson-ext'
 
     # MMI can be detected at runtime too
-    enabled mmi && check_inline_asm mmi '"punpcklhw $f0, $f0, $f0"' '-mloongson-mmi' && append MMIFLAGS '-mloongson-mmi'
+    enabled mmi && check_inline_asm mmi '"pxor $f0, $f0, $f0"' '-mloongson-mmi' && append MMIFLAGS '-mloongson-mmi'
 
     if enabled bigendian && enabled msa; then
         disable msa
@@ -6393,8 +6383,8 @@ enabled avisynth          && require_headers "avisynth/avisynth_c.h"
 enabled cuda_nvcc         && { check_nvcc cuda_nvcc || die "ERROR: failed checking for nvcc."; }
 enabled chromaprint       && require chromaprint chromaprint.h chromaprint_get_version -lchromaprint
 enabled decklink          && { require_headers DeckLinkAPI.h &&
-                               { test_cpp_condition DeckLinkAPIVersion.h "BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a0a0000" || die "ERROR: Decklink API version must be >= 10.10"; } }
-enabled frei0r            && require_headers "frei0r.h dlfcn.h"
+                               { test_cpp_condition DeckLinkAPIVersion.h "BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a0b0000" || die "ERROR: Decklink API version must be >= 10.11"; } }
+enabled frei0r            && require_headers "frei0r.h"
 enabled gmp               && require gmp gmp.h mpz_export -lgmp
 enabled gnutls            && require_pkg_config gnutls gnutls gnutls/gnutls.h gnutls_global_init
 enabled jni               && { [ $target_os = "android" ] && check_headers jni.h && enabled pthreads || die "ERROR: jni not found"; }
@@ -6583,7 +6573,10 @@ enabled omx_rpi           && { test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoR
                                die "ERROR: OpenMAX IL headers from raspberrypi/firmware not found"; } &&
                              enable omx
 enabled omx               && require_headers OMX_Core.h
-enabled openssl           && { check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl ||
+enabled openssl           && { { check_pkg_config openssl "openssl >= 3.0.0" openssl/ssl.h OPENSSL_init_ssl &&
+                                 { enabled gplv3 || ! enabled gpl || enabled nonfree || die "ERROR: OpenSSL >=3.0.0 requires --enable-version3"; }; } ||
+                               { enabled gpl && ! enabled nonfree && die "ERROR: OpenSSL <3.0.0 is incompatible with the gpl"; } ||
+                               check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl ||
                                check_pkg_config openssl openssl openssl/ssl.h SSL_library_init ||
                                check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto ||
                                check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto ||
@@ -7258,15 +7251,12 @@ done
 enabled zlib && add_cppflags -DZLIB_CONST
 
 # conditional library dependencies, in any order
-enabled afftfilt_filter     && prepend avfilter_deps "avcodec"
 enabled afir_filter         && prepend avfilter_deps "avcodec"
 enabled amovie_filter       && prepend avfilter_deps "avformat avcodec"
 enabled aresample_filter    && prepend avfilter_deps "swresample"
 enabled atempo_filter       && prepend avfilter_deps "avcodec"
 enabled bm3d_filter         && prepend avfilter_deps "avcodec"
 enabled cover_rect_filter   && prepend avfilter_deps "avformat avcodec"
-enabled convolve_filter     && prepend avfilter_deps "avcodec"
-enabled deconvolve_filter   && prepend avfilter_deps "avcodec"
 enabled ebur128_filter && enabled swresample && prepend avfilter_deps "swresample"
 enabled elbg_filter         && prepend avfilter_deps "avcodec"
 enabled fftfilt_filter      && prepend avfilter_deps "avcodec"
@@ -7281,10 +7271,8 @@ enabled sab_filter          && prepend avfilter_deps "swscale"
 enabled scale_filter    && prepend avfilter_deps "swscale"
 enabled scale2ref_filter    && prepend avfilter_deps "swscale"
 enabled showcqt_filter      && prepend avfilter_deps "avformat swscale"
-enabled showfreqs_filter    && prepend avfilter_deps "avcodec"
 enabled signature_filter    && prepend avfilter_deps "avcodec avformat"
 enabled smartblur_filter    && prepend avfilter_deps "swscale"
-enabled spectrumsynth_filter && prepend avfilter_deps "avcodec"
 enabled spp_filter          && prepend avfilter_deps "avcodec"
 enabled sr_filter           && prepend avfilter_deps "avformat swscale"
 enabled subtitles_filter    && prepend avfilter_deps "avformat avcodec"
index cd19021..d03e323 100644 (file)
@@ -14,6 +14,38 @@ libavutil:     2021-04-27
 
 API changes, most recent first:
 
+2021-09-08 - xxxxxxxxxx - lavu 57.5.100 - hwcontext_d3d11va.h
+  Add AVD3D11VAFramesContext.texture_infos
+
+2021-09-06 - xxxxxxxxxx - lsws 6.1.100 - swscale.h
+  Add AVFrame-based scaling API:
+    - sws_scale_frame()
+    - sws_frame_start()
+    - sws_frame_end()
+    - sws_send_slice()
+    - sws_receive_slice()
+    - sws_receive_slice_alignment()
+
+2021-09-02 - xxxxxxxxxx - lavc 59.7.100 - avcodec.h
+  Incremented the number of elements of AVCodecParser.codec_ids to seven.
+
+2021-08-24 - xxxxxxxxxx - lavc 59.6.100 - avcodec.h
+  Add FF_CODEC_PROPERTY_FILM_GRAIN
+
+2021-08-20 - xxxxxxxxxx - lavfi 8.3.100 - avfilter.H
+  Add avfilter_filter_pad_count() as a replacement for avfilter_pad_count().
+  Deprecate avfilter_pad_count().
+
+2021-08-17 - xxxxxxxxxx - lavu 57.4.101 - opt.h
+  av_opt_copy() now guarantees that allocated src and dst options
+  don't alias each other even on error.
+
+2021-08-14 - xxxxxxxxxx - lavu 57.4.100 - imgutils.h
+  Add av_image_copy_plane_uc_from()
+
+2021-08-02 - xxxxxxxxxx - lavc 59.4.100 - packet.h
+  Add AVPacket.opaque, AVPacket.opaque_ref, AVPacket.time_base.
+
 2021-07-23 - xxxxxxxxxx - lavu 57.3.100 - common.h macros.h
   Move several macros (AV_NE, FFDIFFSIGN, FFMAX, FFMAX3, FFMIN, FFMIN3,
   FFSWAP, FF_ARRAY_ELEMS, MKTAG, MKBETAG) from common.h to macros.h.
index 18a7586..1900eb4 100644 (file)
@@ -538,11 +538,16 @@ Accepts an expression whose evaluation per-packet determines how often bytes in
 packet will be modified. A value below 0 will result in a variable frequency.
 Default is 0 which results in no modification. However, if neither amount nor drop is specified,
 amount will be set to @var{-1}. See below for accepted variables.
-@item drop, dropamount
+@item drop
 Accepts an expression evaluated per-packet whose value determines whether that packet is dropped.
 Evaluation to a positive value results in the packet being dropped. Evaluation to a negative
 value results in a variable chance of it being dropped, roughly inverse in proportion to the magnitude
 of the value. Default is 0 which results in no drops. See below for accepted variables.
+@item dropamount
+Accepts a non-negative integer, which assigns a variable chance of it being dropped, roughly inverse
+in proportion to the value. Default is 0 which results in no drops. This option is kept for backwards
+compatibility and is equivalent to setting drop to a negative value with the same magnitude
+i.e. @code{dropamount=4} is the same as @code{drop=-4}. Ignored if drop is also specified.
 @end table
 
 Both @code{amount} and @code{drop} accept expressions containing the following variables:
index 5b8cf1b..06ab152 100644 (file)
@@ -96,8 +96,7 @@ backslash or single quotes.
 All subsequent file-related directives apply to that file.
 
 @item @code{ffconcat version 1.0}
-Identify the script type and version. It also sets the @option{safe} option
-to 1 if it was -1.
+Identify the script type and version.
 
 To make FFmpeg recognize the format automatically, this directive must
 appear exactly as is (no extra space or byte-order-mark) on the very first
@@ -151,6 +150,16 @@ directive) will be reduced based on their specified Out point.
 Metadata of the packets of the file. The specified metadata will be set for
 each file packet. You can specify this directive multiple times to add multiple
 metadata entries.
+This directive is deprecated, use @code{file_packet_meta} instead.
+
+@item @code{file_packet_meta @var{key} @var{value}}
+Metadata of the packets of the file. The specified metadata will be set for
+each file packet. You can specify this directive multiple times to add multiple
+metadata entries.
+
+@item @code{option @var{key} @var{value}}
+Option to access, open and probe the file.
+Can be present multiple times.
 
 @item @code{stream}
 Introduce a stream in the virtual file.
@@ -168,6 +177,20 @@ subfiles will be used.
 This is especially useful for MPEG-PS (VOB) files, where the order of the
 streams is not reliable.
 
+@item @code{stream_meta @var{key} @var{value}}
+Metadata for the stream.
+Can be present multiple times.
+
+@item @code{stream_codec @var{value}}
+Codec for the stream.
+
+@item @code{stream_extradata @var{hex_string}}
+Extradata for the string, encoded in hexadecimal.
+
+@item @code{cahpter @var{id} @var{start} @var{end}}
+Add a chapter. @var{id} is an unique identifier, possibly small and
+consecutive.
+
 @end table
 
 @subsection Options
@@ -177,7 +200,8 @@ This demuxer accepts the following option:
 @table @option
 
 @item safe
-If set to 1, reject unsafe file paths. A file path is considered safe if it
+If set to 1, reject unsafe file paths and directives.
+A file path is considered safe if it
 does not contain a protocol specification and is relative and all components
 only contain characters from the portable character set (letters, digits,
 period, underscore and hyphen) and have no period at the beginning of a
@@ -187,9 +211,6 @@ If set to 0, any file name is accepted.
 
 The default is 1.
 
--1 is equivalent to 1 if the format was automatically
-probed and 0 otherwise.
-
 @item auto_convert
 If set to 1, try to perform automatic conversions on packet data to make the
 streams concatenable.
index 908eb20..939ed68 100644 (file)
@@ -155,12 +155,25 @@ int main(int argc, char **argv)
     for (i = 0; i < 25; i++) {
         fflush(stdout);
 
-        /* make sure the frame data is writable */
+        /* Make sure the frame data is writable.
+           On the first round, the frame is fresh from av_frame_get_buffer()
+           and therefore we know it is writable.
+           But on the next rounds, encode() will have called
+           avcodec_send_frame(), and the codec may have kept a reference to
+           the frame in its internal structures, that makes the frame
+           unwritable.
+           av_frame_make_writable() checks that and allocates a new buffer
+           for the frame only if necessary.
+         */
         ret = av_frame_make_writable(frame);
         if (ret < 0)
             exit(1);
 
-        /* prepare a dummy image */
+        /* Prepare a dummy image.
+           In real code, this is where you would have your own logic for
+           filling the frame. FFmpeg does not care what you put in the
+           frame.
+         */
         /* Y */
         for (y = 0; y < c->height; y++) {
             for (x = 0; x < c->width; x++) {
@@ -185,7 +198,12 @@ int main(int argc, char **argv)
     /* flush the encoder */
     encode(c, NULL, pkt, f);
 
-    /* add sequence end code to have a real MPEG file */
+    /* Add sequence end code to have a real MPEG file.
+       It makes only sense because this tiny examples writes packets
+       directly. This is called "elementary stream" and only works for some
+       codecs. To create a valid file, you usually need to write packets
+       into a proper file format or protocol; see muxing.c.
+     */
     if (codec->id == AV_CODEC_ID_MPEG1VIDEO || codec->id == AV_CODEC_ID_MPEG2VIDEO)
         fwrite(endcode, 1, sizeof(endcode), f);
     fclose(f);
index 7415eef..571d868 100644 (file)
 #include "libavutil/hwcontext_qsv.h"
 #include "libavutil/mem.h"
 
-typedef struct DecodeContext {
-    AVBufferRef *hw_device_ref;
-} DecodeContext;
-
 static int get_format(AVCodecContext *avctx, const enum AVPixelFormat *pix_fmts)
 {
     while (*pix_fmts != AV_PIX_FMT_NONE) {
         if (*pix_fmts == AV_PIX_FMT_QSV) {
-            DecodeContext *decode = avctx->opaque;
-            AVHWFramesContext  *frames_ctx;
-            AVQSVFramesContext *frames_hwctx;
-            int ret;
-
-            /* create a pool of surfaces to be used by the decoder */
-            avctx->hw_frames_ctx = av_hwframe_ctx_alloc(decode->hw_device_ref);
-            if (!avctx->hw_frames_ctx)
-                return AV_PIX_FMT_NONE;
-            frames_ctx   = (AVHWFramesContext*)avctx->hw_frames_ctx->data;
-            frames_hwctx = frames_ctx->hwctx;
-
-            frames_ctx->format            = AV_PIX_FMT_QSV;
-            frames_ctx->sw_format         = avctx->sw_pix_fmt;
-            frames_ctx->width             = FFALIGN(avctx->coded_width,  32);
-            frames_ctx->height            = FFALIGN(avctx->coded_height, 32);
-            frames_ctx->initial_pool_size = 32;
-
-            frames_hwctx->frame_type = MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET;
-
-            ret = av_hwframe_ctx_init(avctx->hw_frames_ctx);
-            if (ret < 0)
-                return AV_PIX_FMT_NONE;
-
             return AV_PIX_FMT_QSV;
         }
 
@@ -87,7 +59,7 @@ static int get_format(AVCodecContext *avctx, const enum AVPixelFormat *pix_fmts)
     return AV_PIX_FMT_NONE;
 }
 
-static int decode_packet(DecodeContext *decode, AVCodecContext *decoder_ctx,
+static int decode_packet(AVCodecContext *decoder_ctx,
                          AVFrame *frame, AVFrame *sw_frame,
                          AVPacket *pkt, AVIOContext *output_ctx)
 {
@@ -144,12 +116,12 @@ int main(int argc, char **argv)
     AVPacket pkt = { 0 };
     AVFrame *frame = NULL, *sw_frame = NULL;
 
-    DecodeContext decode = { NULL };
-
     AVIOContext *output_ctx = NULL;
 
     int ret, i;
 
+    AVBufferRef *device_ref = NULL;
+
     if (argc < 3) {
         fprintf(stderr, "Usage: %s <input file> <output file>\n", argv[0]);
         return 1;
@@ -177,7 +149,7 @@ int main(int argc, char **argv)
     }
 
     /* open the hardware device */
-    ret = av_hwdevice_ctx_create(&decode.hw_device_ref, AV_HWDEVICE_TYPE_QSV,
+    ret = av_hwdevice_ctx_create(&device_ref, AV_HWDEVICE_TYPE_QSV,
                                  "auto", NULL, 0);
     if (ret < 0) {
         fprintf(stderr, "Cannot open the hardware device\n");
@@ -209,7 +181,8 @@ int main(int argc, char **argv)
         decoder_ctx->extradata_size = video_st->codecpar->extradata_size;
     }
 
-    decoder_ctx->opaque      = &decode;
+
+    decoder_ctx->hw_device_ctx = av_buffer_ref(device_ref);
     decoder_ctx->get_format  = get_format;
 
     ret = avcodec_open2(decoder_ctx, NULL, NULL);
@@ -239,7 +212,7 @@ int main(int argc, char **argv)
             break;
 
         if (pkt.stream_index == video_st->index)
-            ret = decode_packet(&decode, decoder_ctx, frame, sw_frame, &pkt, output_ctx);
+            ret = decode_packet(decoder_ctx, frame, sw_frame, &pkt, output_ctx);
 
         av_packet_unref(&pkt);
     }
@@ -247,7 +220,7 @@ int main(int argc, char **argv)
     /* flush the decoder */
     pkt.data = NULL;
     pkt.size = 0;
-    ret = decode_packet(&decode, decoder_ctx, frame, sw_frame, &pkt, output_ctx);
+    ret = decode_packet(decoder_ctx, frame, sw_frame, &pkt, output_ctx);
 
 finish:
     if (ret < 0) {
@@ -263,7 +236,7 @@ finish:
 
     avcodec_free_context(&decoder_ctx);
 
-    av_buffer_unref(&decode.hw_device_ref);
+    av_buffer_unref(&device_ref);
 
     avio_close(output_ctx);
 
index c896aed..62d9703 100644 (file)
@@ -1104,6 +1104,9 @@ device type:
 @item dxva2
 @var{device} is the number of the Direct3D 9 display adapter.
 
+@item d3d11va
+@var{device} is the number of the Direct3D 11 display adapter.
+
 @item vaapi
 @var{device} is either an X11 display name or a DRM render node.
 If not specified, it will attempt to open the default X11 display (@emph{$DISPLAY})
@@ -1127,9 +1130,21 @@ If not specified, it will attempt to open the default X11 display (@emph{$DISPLA
 @end table
 If not specified, @samp{auto_any} is used.
 (Note that it may be easier to achieve the desired result for QSV by creating the
-platform-appropriate subdevice (@samp{dxva2} or @samp{vaapi}) and then deriving a
+platform-appropriate subdevice (@samp{dxva2} or @samp{d3d11va} or @samp{vaapi}) and then deriving a
 QSV device from that.)
 
+Alternatively, @samp{child_device_type} helps to choose platform-appropriate subdevice type.
+On Windows @samp{d3d11va} is used as default subdevice type.
+
+Examples:
+@table @emph
+@item -init_hw_device qsv:hw,child_device_type=d3d11va
+Choose the GPU subdevice with type @samp{d3d11va} and create QSV device with @samp{MFX_IMPL_HARDWARE}.
+
+@item -init_hw_device qsv:hw,child_device_type=dxva2
+Choose the GPU subdevice with type @samp{dxva2} and create QSV device with @samp{MFX_IMPL_HARDWARE}.
+@end table
+
 @item opencl
 @var{device} selects the platform and device as @emph{platform_index.device_index}.
 
@@ -1232,6 +1247,9 @@ Use VDPAU (Video Decode and Presentation API for Unix) hardware acceleration.
 @item dxva2
 Use DXVA2 (DirectX Video Acceleration) hardware acceleration.
 
+@item d3d11va
+Use D3D11VA (DirectX Video Acceleration) hardware acceleration.
+
 @item vaapi
 Use VAAPI (Video Acceleration API) hardware acceleration.
 
index 250de8c..b65e54d 100644 (file)
@@ -86,8 +86,6 @@
       <xsd:attribute name="key_frame"     type="xsd:int"    use="required"/>
       <xsd:attribute name="pts"           type="xsd:long" />
       <xsd:attribute name="pts_time"      type="xsd:float"/>
-      <xsd:attribute name="pkt_pts"       type="xsd:long" />
-      <xsd:attribute name="pkt_pts_time"  type="xsd:float"/>
       <xsd:attribute name="pkt_dts"       type="xsd:long" />
       <xsd:attribute name="pkt_dts_time"  type="xsd:float"/>
       <xsd:attribute name="best_effort_timestamp"      type="xsd:long" />
       <xsd:attribute name="coded_width"          type="xsd:int"/>
       <xsd:attribute name="coded_height"         type="xsd:int"/>
       <xsd:attribute name="closed_captions"      type="xsd:boolean"/>
+      <xsd:attribute name="film_grain"           type="xsd:boolean"/>
       <xsd:attribute name="has_b_frames"         type="xsd:int"/>
       <xsd:attribute name="sample_aspect_ratio"  type="xsd:string"/>
       <xsd:attribute name="display_aspect_ratio" type="xsd:string"/>
       <xsd:attribute name="program_id"           type="xsd:int"    use="required"/>
       <xsd:attribute name="program_num"          type="xsd:int"    use="required"/>
       <xsd:attribute name="nb_streams"           type="xsd:int"    use="required"/>
-      <xsd:attribute name="start_time"           type="xsd:float"/>
-      <xsd:attribute name="start_pts"            type="xsd:long"/>
-      <xsd:attribute name="end_time"             type="xsd:float"/>
-      <xsd:attribute name="end_pts"              type="xsd:long"/>
       <xsd:attribute name="pmt_pid"              type="xsd:int"    use="required"/>
       <xsd:attribute name="pcr_pid"              type="xsd:int"    use="required"/>
     </xsd:complexType>
index 66c0f87..8f20ccf 100644 (file)
@@ -745,6 +745,20 @@ Select overlap-save method. Not interpolated samples remain unchanged.
 Default value is @code{a}.
 @end table
 
+@section adecorrelate
+Apply decorrelation to input audio stream.
+
+The filter accepts the following options:
+
+@table @option
+@item stages
+Set decorrelation stages of filtering. Allowed
+range is from 1 to 16. Default value is 6.
+
+@item seed
+Set random seed used for setting delay in samples across channels.
+@end table
+
 @section adelay
 
 Delay one or more audio channels.
@@ -1487,6 +1501,10 @@ Default value is 0.0.
 @item level
 Set output gain applied to final output. Allowed range is from 0.0 to 1.0.
 Default value is 1.0.
+
+@item order
+Set filter order used for filtering. Allowed range is from 1 to 16.
+Default value is 8.
 @end table
 
 @subsection Commands
@@ -2335,6 +2353,46 @@ Default value is 0.0.
 @item level
 Set output gain applied to final output. Allowed range is from 0.0 to 1.0.
 Default value is 1.0.
+
+@item order
+Set filter order used for filtering. Allowed range is from 1 to 16.
+Default value is 8.
+@end table
+
+@subsection Commands
+
+This filter supports the all above options as @ref{commands}.
+
+@section apsyclip
+Apply Psychoacoustic clipper to input audio stream.
+
+The filter accepts the following options:
+
+@table @option
+@item level_in
+Set input gain. By default it is 1. Range is [0.015625 - 64].
+
+@item level_out
+Set output gain. By default it is 1. Range is [0.015625 - 64].
+
+@item clip
+Set the clipping start value. Default value is 0dBFS or 1.
+
+@item diff
+Output only difference samples, useful to hear introduced distortions.
+By default is disabled.
+
+@item adaptive
+Set strenght of adaptive distortion applied. Default value is 0.5.
+Allowed range is from 0 to 1.
+
+@item iterations
+Set number of iterations of psychoacoustic clipper.
+Allowed range is from 1 to 20. Default value is 10.
+
+@item level
+Auto level output signal. Default is disabled.
+This normalizes audio back to 0dBFS if enabled.
 @end table
 
 @subsection Commands
@@ -2647,7 +2705,7 @@ It accepts the following option:
 @table @option
 @item length
 Short window length in seconds, used for peak and trough RMS measurement.
-Default is @code{0.05} (50 milliseconds). Allowed range is @code{[0.01 - 10]}.
+Default is @code{0.05} (50 milliseconds). Allowed range is @code{[0 - 10]}.
 
 @item metadata
 
@@ -2671,6 +2729,7 @@ Flat_factor
 Peak_count
 Noise_floor
 Noise_floor_count
+Entropy
 Bit_depth
 Dynamic_range
 Zero_crossings
@@ -2695,6 +2754,7 @@ Flat_factor
 Peak_count
 Noise_floor
 Noise_floor_count
+Entropy
 Bit_depth
 Number_of_samples
 Number_of_NaNs
@@ -2773,6 +2833,9 @@ Minimum local peak measured in dBFS over a short window.
 Number of occasions (not the number of samples) that the signal attained
 @var{Noise floor}.
 
+@item Entropy
+Entropy measured across whole audio. Entropy of value near 1.0 is typically measured for white noise.
+
 @item Bit depth
 Overall bit depth of audio. Number of bits used for each sample.
 
@@ -2967,6 +3030,35 @@ Change filter tempo scale factor.
 Syntax for the command is : "@var{tempo}"
 @end table
 
+@section atilt
+Apply spectral tilt filter to audio stream.
+
+This filter apply any spectral roll-off slope over any specified frequency band.
+
+The filter accepts the following options:
+
+@table @option
+@item freq
+Set central frequency of tilt in Hz. Default is 10000 Hz.
+
+@item slope
+Set slope direction of tilt. Default is 0. Allowed range is from -1 to 1.
+
+@item width
+Set width of tilt. Default is 1000. Allowed range is from 100 to 10000.
+
+@item order
+Set order of tilt filter.
+
+@item level
+Set input volume level. Allowed range is from 0 to 4.
+Defalt is 1.
+@end table
+
+@subsection Commands
+
+This filter supports the all above options as @ref{commands}.
+
 @section atrim
 
 Trim the input so that the output contains one continuous subpart of the input.
@@ -8224,6 +8316,19 @@ Default value is 0.
 @item saturation
 Set the amount of saturation. Allowed range is from -3.0 to 3.0.
 Default value is 1.
+
+@item analyze
+If set to anything other than @code{manual} it will analyze every frame and use derived
+parameters for filtering output frame.
+
+Possible values are:
+@table @samp
+@item manual
+@item average
+@item minmax
+@item median
+@end table
+Default value is @code{manual}.
 @end table
 
 @subsection Commands
@@ -9969,7 +10074,7 @@ Note that different backends use different file formats. TensorFlow and native
 backend can load files for only its format.
 @end table
 
-It can also be finished with @ref{dnn_processing} filter.
+To get full functionality (such as async execution), please use the @ref{dnn_processing} filter.
 
 @section deshake
 
@@ -10270,11 +10375,8 @@ and the second line is the name of label id 1, etc.
 The label id is considered as name if the label file is not provided.
 
 @item backend_configs
-Set the configs to be passed into backend
-
-@item async
-use DNN async execution if set (default: set),
-roll back to sync execution if the backend does not support async.
+Set the configs to be passed into backend. To use async execution, set async (default: set).
+Roll back to sync execution if the backend does not support async.
 
 @end table
 
@@ -10326,15 +10428,12 @@ Set the input name of the dnn network.
 Set the output name of the dnn network.
 
 @item backend_configs
-Set the configs to be passed into backend
+Set the configs to be passed into backend. To use async execution, set async (default: set).
+Roll back to sync execution if the backend does not support async.
 
 For tensorflow backend, you can set its configs with @option{sess_config} options,
 please use tools/python/tf_sess_config.py to get the configs of TensorFlow backend for your system.
 
-@item async
-use DNN async execution if set (default: set),
-roll back to sync execution if the backend does not support async.
-
 @end table
 
 @subsection Examples
@@ -13020,6 +13119,12 @@ Display video frame rate or sample rate in case of audio used by filter link.
 
 @item eof
 Display link output status.
+
+@item sample_count_in
+Display number of samples taken from filter.
+
+@item sample_count_out
+Display number of samples given out from filter.
 @end table
 
 @item rate, r
@@ -13027,6 +13132,18 @@ Set upper limit for video rate of output stream, Default value is @var{25}.
 This guarantee that output video frame rate will not be higher than this value.
 @end table
 
+@section grayworld
+A color constancy filter that applies color correction based on the grayworld assumption
+
+See: @url{https://www.researchgate.net/publication/275213614_A_New_Color_Correction_Method_for_Underwater_Imaging}
+
+The algorithm  uses linear light, so input
+data should be linearized beforehand (and possibly correctly tagged).
+
+@example
+ffmpeg -i INPUT -vf zscale=transfer=linear,grayworld,zscale=transfer=bt709,format=yuv420p OUTPUT
+@end example
+
 @section greyedge
 A color constancy variation filter which estimates scene illumination via grey edge algorithm
 and corrects the scene colors accordingly.
@@ -13500,6 +13617,82 @@ If set to 1, force the output to terminate when the shortest input
 terminates. Default value is 0.
 @end table
 
+@section hsvhold
+Turns a certain HSV range into gray values.
+
+This filter measures color difference between set HSV color in options
+and ones measured in video stream. Depending on options, output
+colors can be changed to be gray or not.
+
+The filter accepts the following options:
+
+@table @option
+@item hue
+Set the hue value which will be used if color difference calculation.
+Allowed range is from -360 to 360. Default value is 0.
+
+@item sat
+Set the saturation value which will be used if color difference calculation.
+Allowed range is from -1 to 1. Default value is 0.
+
+@item val
+Set the value which will be used if color difference calculation.
+Allowed range is from -1 to 1. Default value is 0.
+
+@item similarity
+Set similarity percentage with the key color.
+Allowed range is from 0 to 1. Default value is 0.01.
+
+0.00001 matches only the exact key color, while 1.0 matches everything.
+
+@item blend
+Blend percentage.
+Allowed range is from 0 to 1. Default value is 0.
+
+0.0 makes pixels either fully gray, or not gray at all.
+
+Higher values result in more gray pixels, with a higher gray pixel
+the more similar the pixels color is to the key color.
+@end table
+
+@section hsvkey
+Turns a certain HSV range into transparency.
+
+This filter measures color difference between set HSV color in options
+and ones measured in video stream. Depending on options, output
+colors can be changed to transparent by adding alpha channel.
+
+The filter accepts the following options:
+
+@table @option
+@item hue
+Set the hue value which will be used if color difference calculation.
+Allowed range is from -360 to 360. Default value is 0.
+
+@item sat
+Set the saturation value which will be used if color difference calculation.
+Allowed range is from -1 to 1. Default value is 0.
+
+@item val
+Set the value which will be used if color difference calculation.
+Allowed range is from -1 to 1. Default value is 0.
+
+@item similarity
+Set similarity percentage with the key color.
+Allowed range is from 0 to 1. Default value is 0.01.
+
+0.00001 matches only the exact key color, while 1.0 matches everything.
+
+@item blend
+Blend percentage.
+Allowed range is from 0 to 1. Default value is 0.
+
+0.0 makes pixels either fully transparent, or not transparent at all.
+
+Higher values result in semi-transparent pixels, with a higher transparency
+the more similar the pixels color is to the key color.
+@end table
+
 @section hue
 
 Modify the hue and/or the saturation of the input.
@@ -17155,7 +17348,7 @@ This filter supports the all above options as @ref{commands}.
 @item
 Output a csv with presentation time and the first two lines of identified EIA-608 captioning data.
 @example
-ffprobe -f lavfi -i movie=captioned_video.mov,readeia608 -show_entries frame=pkt_pts_time:frame_tags=lavfi.readeia608.0.cc,lavfi.readeia608.1.cc -of csv
+ffprobe -f lavfi -i movie=captioned_video.mov,readeia608 -show_entries frame=pts_time:frame_tags=lavfi.readeia608.0.cc,lavfi.readeia608.1.cc -of csv
 @end example
 @end itemize
 
@@ -18197,6 +18390,27 @@ If the specified expression is not valid, it is kept at its current
 value.
 @end table
 
+@section scharr
+Apply scharr operator to input video stream.
+
+The filter accepts the following option:
+
+@table @option
+@item planes
+Set which planes will be processed, unprocessed planes will be copied.
+By default value 0xf, all planes will be processed.
+
+@item scale
+Set value which will be multiplied with filtered result.
+
+@item delta
+Set value which will be added to filtered result.
+@end table
+
+@subsection Commands
+
+This filter supports the all above options as @ref{commands}.
+
 @section scroll
 Scroll input video horizontally and/or vertically by constant speed.
 
@@ -19258,7 +19472,7 @@ Default value is @code{2}. Scale factor is necessary for SRCNN model, because it
 input upscaled using bicubic upscaling with proper scale factor.
 @end table
 
-This feature can also be finished with @ref{dnn_processing} filter.
+To get full functionality (such as async execution), please use the @ref{dnn_processing} filter.
 
 @section ssim
 
@@ -22104,6 +22318,19 @@ Set background opacity.
 Set tint for output.
 Only used with lowpass filter and when display is not overlay and input
 pixel formats are not RGB.
+
+@item fitmode, fm
+Set sample aspect ratio of video output frames.
+Can be used to configure waveform so it is not
+streched too much in one of directions.
+
+@table @samp
+@item none
+Set sample aspect ration to 1/1.
+@item size
+Set sample aspect ratio to match input size of video
+@end table
+Default is @samp{none}.
 @end table
 
 @section weave, doubleweave
@@ -22213,6 +22440,7 @@ Set one of available transition effects:
 @item wipebr
 @item squeezeh
 @item squeezev
+@item zoomin
 @end table
 Default transition effect is fade.
 
@@ -25659,6 +25887,43 @@ A processing speed faster than what is possible without these filters cannot
 be achieved.
 @end table
 
+@section segment, asegment
+
+Split single input stream into multiple streams.
+
+This filter does opposite of concat filters.
+
+@code{segment} works on video frames, @code{asegment} on audio samples.
+
+This filter accepts the following options:
+
+@table @option
+@item timestamps
+Timestamps of output segments separated by '|'. The first segment will run
+from the beginning of the input stream. The last segment will run until
+the end of the input stream
+
+@item frames, samples
+Exact frame/sample count to split the segments.
+@end table
+
+In all cases, prefixing an each segment with '+' will make it relative to the
+previous segment.
+
+@subsection Examples
+
+@itemize
+
+@item
+Split input audio stream into three output audio streams, starting at start of input audio stream
+and storing that in 1st output audio stream, then following at 60th second and storing than in 2nd
+output audio stream, and last after 150th second of input audio stream store in 3rd output audio stream:
+@example
+asegment=timestamps="60|150"
+@end example
+
+@end itemize
+
 @anchor{select}
 @section select, aselect
 
@@ -26749,6 +27014,8 @@ the samples scroll from right to left
 frames are only produced when the samples reach the right
 @item rscroll
 the samples scroll from left to right
+@item lreplace
+the samples start again on the right when they reach the left
 @end table
 
 Default value is @code{replace}.
@@ -26889,7 +27156,8 @@ Set scale gain for calculating intensity color values.
 Default value is @code{1}.
 
 @item data
-Set which data to display. Can be @code{magnitude}, default or @code{phase}.
+Set which data to display. Can be @code{magnitude}, default or @code{phase},
+or unwrapped phase: @code{uphase}.
 
 @item rotation
 Set color rotation, must be in [-1.0, 1.0] range.
@@ -26906,6 +27174,14 @@ Set upper frame rate limit. Default is @code{auto}, unlimited.
 
 @item legend
 Draw time and frequency axes and legends. Default is disabled.
+
+@item drange
+Set dynamic range used to calculate intensity color values. Default is 120 dBFS.
+Allowed range is from 10 to 200.
+
+@item limit
+Set upper limit of input audio samples volume in dBFS. Default is 0 dBFS.
+Allowed range is from -100 to 100.
 @end table
 
 The usage is very similar to the showwaves filter; see the examples in that
@@ -27079,6 +27355,14 @@ Set start frequency from which to display spectrogram. Default is @code{0}.
 
 @item stop
 Set stop frequency to which to display spectrogram. Default is @code{0}.
+
+@item drange
+Set dynamic range used to calculate intensity color values. Default is 120 dBFS.
+Allowed range is from 10 to 200.
+
+@item limit
+Set upper limit of input audio samples volume in dBFS. Default is 0 dBFS.
+Allowed range is from -100 to 100.
 @end table
 
 @subsection Examples
index f3f4fea..ce5fd46 100644 (file)
@@ -599,6 +599,7 @@ library:
 @item raw NULL                  @tab X @tab
 @item raw video                 @tab X @tab X
 @item raw id RoQ                @tab X @tab
+@item raw OBU                   @tab X @tab X
 @item raw SBC                   @tab X @tab X
 @item raw Shorten               @tab   @tab X
 @item raw TAK                   @tab   @tab X
@@ -1018,7 +1019,7 @@ following image formats are supported:
 @item QuickTime 8BPS video   @tab     @tab  X
 @item QuickTime Animation (RLE) video  @tab  X  @tab  X
     @tab fourcc: 'rle '
-@item QuickTime Graphics (SMC)  @tab     @tab  X
+@item QuickTime Graphics (SMC)  @tab  X  @tab  X
     @tab fourcc: 'smc '
 @item QuickTime video (RPZA) @tab  X  @tab  X
     @tab fourcc: rpza
index 2b4fb80..874afab 100644 (file)
@@ -217,16 +217,46 @@ git config --global core.editor
 or set by one of the following environment variables:
 @var{GIT_EDITOR}, @var{VISUAL} or @var{EDITOR}.
 
-Log messages should be concise but descriptive. Explain why you made a change,
-what you did will be obvious from the changes themselves most of the time.
-Saying just "bug fix" or "10l" is bad. Remember that people of varying skill
-levels look at and educate themselves while reading through your code. Don't
-include filenames in log messages, Git provides that information.
-
-Possibly make the commit message have a terse, descriptive first line, an
-empty line and then a full description. The first line will be used to name
+@section Writing a commit message
+
+Log messages should be concise but descriptive.
+
+The first line must contain the context, a colon and a very short
+summary of what the commit does. Details can be added, if necessary,
+separated by an empty line. These details should not exceed 60-72 characters
+per line, except when containing code.
+
+Example of a good commit message:
+
+@example
+avcodec/cbs: add a helper to read extradata within packet side data
+
+Using ff_cbs_read() on the raw buffer will not parse it as extradata,
+resulting in parsing errors for example when handling ISOBMFF avcC.
+This helper works around that.
+@end example
+
+@example
+ptr might be NULL
+@end example
+
+If the summary on the first line is not enough, in the body of the message,
+explain why you made a change, what you did will be obvious from the changes
+themselves most of the time. Saying just "bug fix" or "10l" is bad. Remember
+that people of varying skill levels look at and educate themselves while
+reading through your code. Don't include filenames in log messages except in
+the context, Git provides that information.
+
+If the commit fixes a registered issue, state it in a separate line of the
+body: @code{Fix Trac ticket #42.}
+
+The first line will be used to name
 the patch by @command{git format-patch}.
 
+Common mistakes for the first line, as seen in @command{git log --oneline}
+include: missing context at the beginning; description of what the code did
+before the patch; line too long or wrapped to the second line.
+
 @section Preparing a patchset
 
 @example
index b377924..5be647f 100644 (file)
@@ -344,9 +344,23 @@ Defines number of audio channels to capture. Must be @samp{2}, @samp{8} or @samp
 Defaults to @samp{2}.
 
 @item duplex_mode
-Sets the decklink device duplex mode. Must be @samp{unset}, @samp{half} or @samp{full}.
+Sets the decklink device duplex/profile mode. Must be @samp{unset}, @samp{half}, @samp{full},
+@samp{one_sub_device_full}, @samp{one_sub_device_half}, @samp{two_sub_device_full},
+@samp{four_sub_device_half}
 Defaults to @samp{unset}.
 
+Note: DeckLink SDK 11.0 have replaced the duplex property by a profile property.
+For the DeckLink Duo 2 and DeckLink Quad 2, a profile is shared between any 2
+sub-devices that utilize the same connectors. For the DeckLink 8K Pro, a profile
+is shared between all 4 sub-devices. So DeckLink 8K Pro support four profiles.
+
+Valid profile modes for DeckLink 8K Pro(with DeckLink SDK >= 11.0):
+@samp{one_sub_device_full}, @samp{one_sub_device_half}, @samp{two_sub_device_full},
+@samp{four_sub_device_half}
+
+Valid profile modes for DeckLink Quad 2 and DeckLink Duo 2:
+@samp{half}, @samp{full}
+
 @item timecode_format
 Timecode type to include in the frame and video stream metadata. Must be
 @samp{none}, @samp{rp188vitc}, @samp{rp188vitc2}, @samp{rp188ltc},
index 0972bbf..7338e8d 100644 (file)
@@ -1564,15 +1564,15 @@ have no effect if it is not.
 @item default_mode
 This option controls how the FlagDefault of the output tracks will be set.
 It influences which tracks players should play by default. The default mode
-is @samp{infer}.
+is @samp{passthrough}.
 @table @samp
 @item infer
-In this mode, for each type of track (audio, video or subtitle), if there is
-a track with disposition default of this type, then the first such track
-(i.e. the one with the lowest index) will be marked as default; if no such
-track exists, the first track of this type will be marked as default instead
-(if existing). This ensures that the default flag is set in a sensible way even
-if the input originated from containers that lack the concept of default tracks.
+Every track with disposition default will have the FlagDefault set.
+Additionally, for each type of track (audio, video or subtitle), if no track
+with disposition default of this type exists, then the first track of this type
+will be marked as default (if existing). This ensures that the default flag
+is set in a sensible way even if the input originated from containers that
+lack the concept of default tracks.
 @item infer_no_subs
 This mode is the same as infer except that if no subtitle track with
 disposition default exists, no subtitle track will be marked as default.
@@ -2169,6 +2169,10 @@ ITU-T H.262 / MPEG-2 Part 2 video.
 
 Extensions: m2v
 
+@subsection obu
+
+AV1 low overhead Open Bitstream Units muxer. Temporal delimiter OBUs will be inserted in all temporal units of the stream.
+
 @subsection rawvideo
 
 Raw uncompressed video.
index aaf2479..aa41e29 100644 (file)
@@ -198,13 +198,43 @@ Amount of time to preroll video in seconds.
 Defaults to @option{0.5}.
 
 @item duplex_mode
-Sets the decklink device duplex mode. Must be @samp{unset}, @samp{half} or @samp{full}.
+Sets the decklink device duplex/profile mode. Must be @samp{unset}, @samp{half}, @samp{full},
+@samp{one_sub_device_full}, @samp{one_sub_device_half}, @samp{two_sub_device_full},
+@samp{four_sub_device_half}
 Defaults to @samp{unset}.
 
+Note: DeckLink SDK 11.0 have replaced the duplex property by a profile property.
+For the DeckLink Duo 2 and DeckLink Quad 2, a profile is shared between any 2
+sub-devices that utilize the same connectors. For the DeckLink 8K Pro, a profile
+is shared between all 4 sub-devices. So DeckLink 8K Pro support four profiles.
+
+Valid profile modes for DeckLink 8K Pro(with DeckLink SDK >= 11.0):
+@samp{one_sub_device_full}, @samp{one_sub_device_half}, @samp{two_sub_device_full},
+@samp{four_sub_device_half}
+
+Valid profile modes for DeckLink Quad 2 and DeckLink Duo 2:
+@samp{half}, @samp{full}
+
 @item timing_offset
 Sets the genlock timing pixel offset on the used output.
 Defaults to @samp{unset}.
 
+@item link
+Sets the SDI video link configuration on the used output. Must be
+@samp{unset}, @samp{single} link SDI, @samp{dual} link SDI or @samp{quad} link
+SDI.
+Defaults to @samp{unset}.
+
+@item sqd
+Enable Square Division Quad Split mode for Quad-link SDI output.
+Must be @samp{unset}, @samp{true} or @samp{false}.
+Defaults to @option{unset}.
+
+@item level_a
+Enable SMPTE Level A mode on the used output.
+Must be @samp{unset}, @samp{true} or @samp{false}.
+Defaults to @option{unset}.
+
 @end table
 
 @subsection Examples
index 5affaa3..5234932 100644 (file)
@@ -10,7 +10,6 @@ ALLAVPROGS   = $(AVBASENAMES:%=%$(PROGSSUF)$(EXESUF))
 ALLAVPROGS_G = $(AVBASENAMES:%=%$(PROGSSUF)_g$(EXESUF))
 
 OBJS-ffmpeg                        += fftools/ffmpeg_opt.o fftools/ffmpeg_filter.o fftools/ffmpeg_hw.o
-OBJS-ffmpeg-$(CONFIG_LIBMFX)       += fftools/ffmpeg_qsv.o
 ifndef CONFIG_VIDEOTOOLBOX
 OBJS-ffmpeg-$(CONFIG_VDA)          += fftools/ffmpeg_videotoolbox.o
 endif
index 0b1ef03..ed3dcd3 100644 (file)
@@ -68,12 +68,11 @@ static int init_report(const char *env);
 
 AVDictionary *sws_dict;
 AVDictionary *swr_opts;
-AVDictionary *format_opts, *codec_opts, *resample_opts;
+AVDictionary *format_opts, *codec_opts;
 
 static FILE *report_file;
 static int report_file_level = AV_LOG_DEBUG;
 int hide_banner = 0;
-int cpu_count = -1;
 
 enum show_muxdemuxers {
     SHOW_DEFAULT,
@@ -81,18 +80,12 @@ enum show_muxdemuxers {
     SHOW_MUXERS,
 };
 
-void init_opts(void)
-{
-    av_dict_set(&sws_dict, "flags", "bicubic", 0);
-}
-
 void uninit_opts(void)
 {
     av_dict_free(&swr_opts);
     av_dict_free(&sws_dict);
     av_dict_free(&format_opts);
     av_dict_free(&codec_opts);
-    av_dict_free(&resample_opts);
 }
 
 void log_callback_help(void *ptr, int level, const char *fmt, va_list vl)
@@ -663,14 +656,11 @@ static void finish_group(OptionParseContext *octx, int group_idx,
     g->swr_opts    = swr_opts;
     g->codec_opts  = codec_opts;
     g->format_opts = format_opts;
-    g->resample_opts = resample_opts;
 
     codec_opts  = NULL;
     format_opts = NULL;
-    resample_opts = NULL;
     sws_dict    = NULL;
     swr_opts    = NULL;
-    init_opts();
 
     memset(&octx->cur_group, 0, sizeof(octx->cur_group));
 }
@@ -708,8 +698,6 @@ static void init_parse_context(OptionParseContext *octx,
 
     octx->global_opts.group_def = &global_group;
     octx->global_opts.arg       = "";
-
-    init_opts();
 }
 
 void uninit_parse_context(OptionParseContext *octx)
@@ -723,7 +711,6 @@ void uninit_parse_context(OptionParseContext *octx)
             av_freep(&l->groups[j].opts);
             av_dict_free(&l->groups[j].codec_opts);
             av_dict_free(&l->groups[j].format_opts);
-            av_dict_free(&l->groups[j].resample_opts);
 
             av_dict_free(&l->groups[j].sws_dict);
             av_dict_free(&l->groups[j].swr_opts);
@@ -835,7 +822,7 @@ do {                                                                           \
         return AVERROR_OPTION_NOT_FOUND;
     }
 
-    if (octx->cur_group.nb_opts || codec_opts || format_opts || resample_opts)
+    if (octx->cur_group.nb_opts || codec_opts || format_opts)
         av_log(NULL, AV_LOG_WARNING, "Trailing option(s) found in the "
                "command: may be ignored.\n");
 
@@ -862,7 +849,7 @@ int opt_cpucount(void *optctx, const char *opt, const char *arg)
     int count;
 
     static const AVOption opts[] = {
-        {"count", NULL, 0, AV_OPT_TYPE_INT, { .i64 = -1}, -1, INT_MAX, NULL},
+        {"count", NULL, 0, AV_OPT_TYPE_INT, { .i64 = -1}, -1, INT_MAX},
         {NULL},
     };
     static const AVClass class = {
@@ -912,20 +899,18 @@ int opt_loglevel(void *optctx, const char *opt, const char *arg)
         if (!i && !cmd) {
             flags = 0;  /* missing relative prefix, build absolute value */
         }
-        if (!strncmp(token, "repeat", 6)) {
+        if (av_strstart(token, "repeat", &arg)) {
             if (cmd == '-') {
                 flags |= AV_LOG_SKIP_REPEATED;
             } else {
                 flags &= ~AV_LOG_SKIP_REPEATED;
             }
-            arg = token + 6;
-        } else if (!strncmp(token, "level", 5)) {
+        } else if (av_strstart(token, "level", &arg)) {
             if (cmd == '-') {
                 flags &= ~AV_LOG_PRINT_LEVEL;
             } else {
                 flags |= AV_LOG_PRINT_LEVEL;
             }
-            arg = token + 5;
         } else {
             break;
         }
@@ -1360,9 +1345,9 @@ static int show_formats_devices(void *optctx, const char *opt, const char *arg,
             break;
         last_name = name;
 
-        printf(" %s%s %-15s %s\n",
-               decode ? "D" : " ",
-               encode ? "E" : " ",
+        printf(" %c%c %-15s %s\n",
+               decode ? 'D' : ' ',
+               encode ? 'E' : ' ',
                name,
             long_name ? long_name:" ");
     }
@@ -1718,12 +1703,14 @@ int show_filters(void *optctx, const char *opt, const char *arg)
     while ((filter = av_filter_iterate(&opaque))) {
         descr_cur = descr;
         for (i = 0; i < 2; i++) {
+            unsigned nb_pads;
             if (i) {
                 *(descr_cur++) = '-';
                 *(descr_cur++) = '>';
             }
             pad = i ? filter->outputs : filter->inputs;
-            for (j = 0; pad && avfilter_pad_get_name(pad, j); j++) {
+            nb_pads = avfilter_filter_pad_count(filter, i);
+            for (j = 0; j < nb_pads; j++) {
                 if (descr_cur >= descr + sizeof(descr) - 4)
                     break;
                 *(descr_cur++) = get_media_type_char(avfilter_pad_get_type(pad, j));
@@ -1958,7 +1945,7 @@ static void show_help_filter(const char *name)
         printf("    slice threading supported\n");
 
     printf("    Inputs:\n");
-    count = avfilter_pad_count(f->inputs);
+    count = avfilter_filter_pad_count(f, 0);
     for (i = 0; i < count; i++) {
         printf("       #%d: %s (%s)\n", i, avfilter_pad_get_name(f->inputs, i),
                media_type_string(avfilter_pad_get_type(f->inputs, i)));
@@ -1969,7 +1956,7 @@ static void show_help_filter(const char *name)
         printf("        none (source filter)\n");
 
     printf("    Outputs:\n");
-    count = avfilter_pad_count(f->outputs);
+    count = avfilter_filter_pad_count(f, 1);
     for (i = 0; i < count; i++) {
         printf("       #%d: %s (%s)\n", i, avfilter_pad_get_name(f->outputs, i),
                media_type_string(avfilter_pad_get_type(f->outputs, i)));
@@ -2214,13 +2201,11 @@ void *grow_array(void *array, int elem_size, int *size, int new_size)
     return array;
 }
 
-double get_rotation(AVStream *st)
+double get_rotation(int32_t *displaymatrix)
 {
-    uint8_t* displaymatrix = av_stream_get_side_data(st,
-                                                     AV_PKT_DATA_DISPLAYMATRIX, NULL);
     double theta = 0;
     if (displaymatrix)
-        theta = -av_display_rotation_get((int32_t*) displaymatrix);
+        theta = -round(av_display_rotation_get((int32_t*) displaymatrix));
 
     theta -= 360*floor(theta/360 + 0.9/360);
 
@@ -2243,19 +2228,13 @@ static int print_device_sources(const AVInputFormat *fmt, AVDictionary *opts)
         return AVERROR(EINVAL);
 
     printf("Auto-detected sources for %s:\n", fmt->name);
-    if (!fmt->get_device_list) {
-        ret = AVERROR(ENOSYS);
-        printf("Cannot list sources. Not implemented.\n");
-        goto fail;
-    }
-
     if ((ret = avdevice_list_input_sources(fmt, NULL, opts, &device_list)) < 0) {
-        printf("Cannot list sources.\n");
+        printf("Cannot list sources: %s\n", av_err2str(ret));
         goto fail;
     }
 
     for (i = 0; i < device_list->nb_devices; i++) {
-        printf("%s %s [%s]\n", device_list->default_device == i ? "*" : " ",
+        printf("%c %s [%s]\n", device_list->default_device == i ? '*' : ' ',
                device_list->devices[i]->device_name, device_list->devices[i]->device_description);
     }
 
@@ -2273,19 +2252,13 @@ static int print_device_sinks(const AVOutputFormat *fmt, AVDictionary *opts)
         return AVERROR(EINVAL);
 
     printf("Auto-detected sinks for %s:\n", fmt->name);
-    if (!fmt->get_device_list) {
-        ret = AVERROR(ENOSYS);
-        printf("Cannot list sinks. Not implemented.\n");
-        goto fail;
-    }
-
     if ((ret = avdevice_list_output_sinks(fmt, NULL, opts, &device_list)) < 0) {
-        printf("Cannot list sinks.\n");
+        printf("Cannot list sinks: %s\n", av_err2str(ret));
         goto fail;
     }
 
     for (i = 0; i < device_list->nb_devices; i++) {
-        printf("%s %s [%s]\n", device_list->default_device == i ? "*" : " ",
+        printf("%c %s [%s]\n", device_list->default_device == i ? '*' : ' ',
                device_list->devices[i]->device_name, device_list->devices[i]->device_description);
     }
 
index d1d1257..30f0b79 100644 (file)
@@ -48,9 +48,8 @@ extern AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB];
 extern AVFormatContext *avformat_opts;
 extern AVDictionary *sws_dict;
 extern AVDictionary *swr_opts;
-extern AVDictionary *format_opts, *codec_opts, *resample_opts;
+extern AVDictionary *format_opts, *codec_opts;
 extern int hide_banner;
-extern int cpu_count;
 
 /**
  * Register a program-specific cleanup routine.
@@ -324,7 +323,6 @@ typedef struct OptionGroup {
 
     AVDictionary *codec_opts;
     AVDictionary *format_opts;
-    AVDictionary *resample_opts;
     AVDictionary *sws_dict;
     AVDictionary *swr_opts;
 } OptionGroup;
@@ -650,6 +648,6 @@ void *grow_array(void *array, int elem_size, int *size, int new_size);
     char name[128];\
     av_get_channel_layout_string(name, sizeof(name), 0, ch_layout);
 
-double get_rotation(AVStream *st);
+double get_rotation(int32_t *displaymatrix);
 
 #endif /* FFTOOLS_CMDUTILS_H */
index b0ce7c7..5365f71 100644 (file)
@@ -535,6 +535,7 @@ static void ffmpeg_cleanup(int ret)
                 av_frame_free(&frame);
             }
             av_fifo_freep(&ifilter->frame_queue);
+            av_freep(&ifilter->displaymatrix);
             if (ist->sub2video.sub_queue) {
                 while (av_fifo_size(ist->sub2video.sub_queue)) {
                     AVSubtitle sub;
@@ -653,6 +654,7 @@ static void ffmpeg_cleanup(int ret)
                    av_err2str(AVERROR(errno)));
     }
     av_freep(&vstats_filename);
+    av_freep(&filter_nbthreads);
 
     av_freep(&input_streams);
     av_freep(&input_files);
@@ -2182,6 +2184,7 @@ static int ifilter_has_all_input_formats(FilterGraph *fg)
 static int ifilter_send_frame(InputFilter *ifilter, AVFrame *frame)
 {
     FilterGraph *fg = ifilter->graph;
+    AVFrameSideData *sd;
     int need_reinit, ret, i;
 
     /* determine if the parameters for this input changed */
@@ -2206,6 +2209,12 @@ static int ifilter_send_frame(InputFilter *ifilter, AVFrame *frame)
         (ifilter->hw_frames_ctx && ifilter->hw_frames_ctx->data != frame->hw_frames_ctx->data))
         need_reinit = 1;
 
+    if (sd = av_frame_get_side_data(frame, AV_FRAME_DATA_DISPLAYMATRIX)) {
+        if (!ifilter->displaymatrix || memcmp(sd->data, ifilter->displaymatrix, sizeof(int32_t) * 9))
+            need_reinit = 1;
+    } else if (ifilter->displaymatrix)
+        need_reinit = 1;
+
     if (need_reinit) {
         ret = ifilter_parameters_from_frame(ifilter, frame);
         if (ret < 0)
@@ -3571,11 +3580,6 @@ static int init_output_stream(OutputStream *ost, AVFrame *frame,
         }
         if (!av_dict_get(ost->encoder_opts, "threads", NULL, 0))
             av_dict_set(&ost->encoder_opts, "threads", "auto", 0);
-        if (ost->enc->type == AVMEDIA_TYPE_AUDIO &&
-            !codec->defaults &&
-            !av_dict_get(ost->encoder_opts, "b", NULL, 0) &&
-            !av_dict_get(ost->encoder_opts, "ab", NULL, 0))
-            av_dict_set(&ost->encoder_opts, "b", "128000", 0);
 
         ret = hw_device_setup_for_encode(ost);
         if (ret < 0) {
@@ -4926,7 +4930,6 @@ static int transcode(void)
                 av_dict_free(&ost->encoder_opts);
                 av_dict_free(&ost->sws_dict);
                 av_dict_free(&ost->swr_opts);
-                av_dict_free(&ost->resample_opts);
             }
         }
     }
index d9c0628..30225e9 100644 (file)
@@ -61,7 +61,6 @@ enum HWAccelID {
     HWACCEL_AUTO,
     HWACCEL_GENERIC,
     HWACCEL_VIDEOTOOLBOX,
-    HWACCEL_QSV,
 };
 
 typedef struct HWAccel {
@@ -259,6 +258,7 @@ typedef struct InputFilter {
     uint64_t channel_layout;
 
     AVBufferRef *hw_frames_ctx;
+    int32_t *displaymatrix;
 
     int eof;
 } InputFilter;
@@ -361,8 +361,6 @@ typedef struct InputStream {
         unsigned int initialize; ///< marks if sub2video_update should force an initialization
     } sub2video;
 
-    int dr1;
-
     /* decoded data from this stream goes into all those filters
      * currently video and audio only */
     InputFilter **filters;
@@ -414,7 +412,6 @@ typedef struct InputFile {
     int64_t ts_offset;
     int64_t last_ts;
     int64_t start_time;   /* user-specified start time in AV_TIME_BASE or AV_NOPTS_VALUE */
-    int seek_timestamp;
     int64_t recording_time;
     int nb_streams;       /* number of stream that ffmpeg is aware of; may be different
                              from ctx.nb_streams if new streams appear during av_read_frame() */
@@ -524,7 +521,6 @@ typedef struct OutputStream {
     AVDictionary *encoder_opts;
     AVDictionary *sws_dict;
     AVDictionary *swr_opts;
-    AVDictionary *resample_opts;
     char *apad;
     OSTFinished finished;        /* no more packets should be written for this stream */
     int unavailable;                     /* true if the steram is unavailable (possibly temporarily) */
@@ -634,7 +630,7 @@ extern AVIOContext *progress_avio;
 extern float max_error_rate;
 extern char *videotoolbox_pixfmt;
 
-extern int filter_nbthreads;
+extern char *filter_nbthreads;
 extern int filter_complex_nbthreads;
 extern int vstats_version;
 extern int auto_conversion_filters;
index 958d74f..da0d4fa 100644 (file)
@@ -628,7 +628,7 @@ static int configure_output_filter(FilterGraph *fg, OutputFilter *ofilter,
     switch (avfilter_pad_get_type(out->filter_ctx->output_pads, out->pad_idx)) {
     case AVMEDIA_TYPE_VIDEO: return configure_output_video_filter(fg, ofilter, out);
     case AVMEDIA_TYPE_AUDIO: return configure_output_audio_filter(fg, ofilter, out);
-    default: av_assert0(0);
+    default: av_assert0(0); return 0;
     }
 }
 
@@ -757,21 +757,44 @@ static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
     last_filter = ifilter->filter;
 
     if (ist->autorotate) {
-        double theta = get_rotation(ist->st);
+        int32_t *displaymatrix = ifilter->displaymatrix;
+        double theta;
+
+        if (!displaymatrix)
+            displaymatrix = (int32_t *)av_stream_get_side_data(ist->st, AV_PKT_DATA_DISPLAYMATRIX, NULL);
+        theta = get_rotation(displaymatrix);
 
         if (fabs(theta - 90) < 1.0) {
+            if (displaymatrix[3] > 0) {
+                ret = insert_filter(&last_filter, &pad_idx, "hflip", NULL);
+                if (ret < 0)
+                    return ret;
+            }
             ret = insert_filter(&last_filter, &pad_idx, "transpose", "clock");
         } else if (fabs(theta - 180) < 1.0) {
-            ret = insert_filter(&last_filter, &pad_idx, "hflip", NULL);
-            if (ret < 0)
-                return ret;
-            ret = insert_filter(&last_filter, &pad_idx, "vflip", NULL);
+            if (displaymatrix[0] < 0) {
+                ret = insert_filter(&last_filter, &pad_idx, "hflip", NULL);
+                if (ret < 0)
+                    return ret;
+            }
+            if (displaymatrix[4] < 0) {
+                ret = insert_filter(&last_filter, &pad_idx, "vflip", NULL);
+            }
         } else if (fabs(theta - 270) < 1.0) {
+            if (displaymatrix[3] < 0) {
+                ret = insert_filter(&last_filter, &pad_idx, "hflip", NULL);
+                if (ret < 0)
+                    return ret;
+            }
             ret = insert_filter(&last_filter, &pad_idx, "transpose", "cclock");
         } else if (fabs(theta) > 1.0) {
             char rotate_buf[64];
             snprintf(rotate_buf, sizeof(rotate_buf), "%f*PI/180", theta);
             ret = insert_filter(&last_filter, &pad_idx, "rotate", rotate_buf);
+        } else if (fabs(theta) < 1.0) {
+            if (displaymatrix && displaymatrix[4] < 0) {
+                ret = insert_filter(&last_filter, &pad_idx, "vflip", NULL);
+            }
         }
         if (ret < 0)
             return ret;
@@ -938,7 +961,7 @@ static int configure_input_filter(FilterGraph *fg, InputFilter *ifilter,
     switch (avfilter_pad_get_type(in->filter_ctx->input_pads, in->pad_idx)) {
     case AVMEDIA_TYPE_VIDEO: return configure_input_video_filter(fg, ifilter, in);
     case AVMEDIA_TYPE_AUDIO: return configure_input_audio_filter(fg, ifilter, in);
-    default: av_assert0(0);
+    default: av_assert0(0); return 0;
     }
 }
 
@@ -968,18 +991,29 @@ int configure_filtergraph(FilterGraph *fg)
         char args[512];
         AVDictionaryEntry *e = NULL;
 
-        fg->graph->nb_threads = filter_nbthreads;
+        if (filter_nbthreads) {
+            ret = av_opt_set(fg->graph, "threads", filter_nbthreads, 0);
+            if (ret < 0)
+                goto fail;
+        } else {
+            e = av_dict_get(ost->encoder_opts, "threads", NULL, 0);
+            if (e)
+                av_opt_set(fg->graph, "threads", e->value, 0);
+        }
 
         args[0] = 0;
+        e       = NULL;
         while ((e = av_dict_get(ost->sws_dict, "", e,
                                 AV_DICT_IGNORE_SUFFIX))) {
             av_strlcatf(args, sizeof(args), "%s=%s:", e->key, e->value);
         }
-        if (strlen(args))
+        if (strlen(args)) {
             args[strlen(args)-1] = 0;
-        fg->graph->scale_sws_opts = av_strdup(args);
+            fg->graph->scale_sws_opts = av_strdup(args);
+        }
 
         args[0] = 0;
+        e       = NULL;
         while ((e = av_dict_get(ost->swr_opts, "", e,
                                 AV_DICT_IGNORE_SUFFIX))) {
             av_strlcatf(args, sizeof(args), "%s=%s:", e->key, e->value);
@@ -987,18 +1021,6 @@ int configure_filtergraph(FilterGraph *fg)
         if (strlen(args))
             args[strlen(args)-1] = 0;
         av_opt_set(fg->graph, "aresample_swr_opts", args, 0);
-
-        args[0] = '\0';
-        while ((e = av_dict_get(fg->outputs[0]->ost->resample_opts, "", e,
-                                AV_DICT_IGNORE_SUFFIX))) {
-            av_strlcatf(args, sizeof(args), "%s=%s:", e->key, e->value);
-        }
-        if (strlen(args))
-            args[strlen(args) - 1] = '\0';
-
-        e = av_dict_get(ost->encoder_opts, "threads", NULL, 0);
-        if (e)
-            av_opt_set(fg->graph, "threads", e->value, 0);
     } else {
         fg->graph->nb_threads = filter_complex_nbthreads;
     }
@@ -1128,6 +1150,8 @@ fail:
 
 int ifilter_parameters_from_frame(InputFilter *ifilter, const AVFrame *frame)
 {
+    AVFrameSideData *sd;
+
     av_buffer_unref(&ifilter->hw_frames_ctx);
 
     ifilter->format = frame->format;
@@ -1140,6 +1164,11 @@ int ifilter_parameters_from_frame(InputFilter *ifilter, const AVFrame *frame)
     ifilter->channels            = frame->channels;
     ifilter->channel_layout      = frame->channel_layout;
 
+    av_freep(&ifilter->displaymatrix);
+    sd = av_frame_get_side_data(frame, AV_FRAME_DATA_DISPLAYMATRIX);
+    if (sd)
+        ifilter->displaymatrix = av_memdup(sd->data, sizeof(int32_t) * 9);
+
     if (frame->hw_frames_ctx) {
         ifilter->hw_frames_ctx = av_buffer_ref(frame->hw_frames_ctx);
         if (!ifilter->hw_frames_ctx)
index fc4a5d3..14e702b 100644 (file)
@@ -93,6 +93,8 @@ static char *hw_device_default_name(enum AVHWDeviceType type)
 
 int hw_device_init_from_string(const char *arg, HWDevice **dev_out)
 {
+    // "type=name"
+    // "type=name,key=value,key2=value2"
     // "type=name:device,key=value,key2=value2"
     // "type:device,key=value,key2=value2"
     // -> av_hwdevice_ctx_create()
@@ -124,7 +126,7 @@ int hw_device_init_from_string(const char *arg, HWDevice **dev_out)
     }
 
     if (*p == '=') {
-        k = strcspn(p + 1, ":@");
+        k = strcspn(p + 1, ":@,");
 
         name = av_strndup(p + 1, k);
         if (!name) {
@@ -190,6 +192,18 @@ int hw_device_init_from_string(const char *arg, HWDevice **dev_out)
                                              src->device_ref, 0);
         if (err < 0)
             goto fail;
+    } else if (*p == ',') {
+        err = av_dict_parse_string(&options, p + 1, "=", ",", 0);
+
+        if (err < 0) {
+            errmsg = "failed to parse options";
+            goto invalid;
+        }
+
+        err = av_hwdevice_ctx_create(&device_ref, type,
+                                     NULL, options, 0);
+        if (err < 0)
+            goto fail;
     } else {
         errmsg = "parse error";
         goto invalid;
@@ -339,6 +353,18 @@ int hw_device_setup_for_decode(InputStream *ist)
         } else if (ist->hwaccel_id == HWACCEL_GENERIC) {
             type = ist->hwaccel_device_type;
             dev = hw_device_get_by_type(type);
+
+            // When "-qsv_device device" is used, an internal QSV device named
+            // as "__qsv_device" is created. Another QSV device is created too
+            // if "-init_hw_device qsv=name:device" is used. There are 2 QSV devices
+            // if both "-qsv_device device" and "-init_hw_device qsv=name:device"
+            // are used, hw_device_get_by_type(AV_HWDEVICE_TYPE_QSV) returns NULL.
+            // To keep back-compatibility with the removed ad-hoc libmfx setup code,
+            // call hw_device_get_by_name("__qsv_device") to select the internal QSV
+            // device.
+            if (!dev && type == AV_HWDEVICE_TYPE_QSV)
+                dev = hw_device_get_by_name("__qsv_device");
+
             if (!dev)
                 err = hw_device_init_from_type(type, NULL, &dev);
         } else {
@@ -527,15 +553,21 @@ int hw_device_setup_for_filter(FilterGraph *fg)
     HWDevice *dev;
     int i;
 
-    // If the user has supplied exactly one hardware device then just
-    // give it straight to every filter for convenience.  If more than
-    // one device is available then the user needs to pick one explcitly
-    // with the filter_hw_device option.
+    // Pick the last hardware device if the user doesn't pick the device for
+    // filters explicitly with the filter_hw_device option.
     if (filter_hw_device)
         dev = filter_hw_device;
-    else if (nb_hw_devices == 1)
-        dev = hw_devices[0];
-    else
+    else if (nb_hw_devices > 0) {
+        dev = hw_devices[nb_hw_devices - 1];
+
+        if (nb_hw_devices > 1)
+            av_log(NULL, AV_LOG_WARNING, "There are %d hardware devices. device "
+                   "%s of type %s is picked for filters by default. Set hardware "
+                   "device explicitly with the filter_hw_device option if device "
+                   "%s is not usable for filters.\n",
+                   nb_hw_devices, dev->name,
+                   av_hwdevice_get_type_name(dev->type), dev->name);
+    } else
         dev = NULL;
 
     if (dev) {
index 1b43bab..6ca28cf 100644 (file)
@@ -137,9 +137,6 @@ static const char *const opt_name_enc_time_bases[]            = {"enc_time_base"
 const HWAccel hwaccels[] = {
 #if CONFIG_VIDEOTOOLBOX
     { "videotoolbox", videotoolbox_init, HWACCEL_VIDEOTOOLBOX, AV_PIX_FMT_VIDEOTOOLBOX },
-#endif
-#if CONFIG_LIBMFX
-    { "qsv",   qsv_init,   HWACCEL_QSV,   AV_PIX_FMT_QSV },
 #endif
     { 0 },
 };
@@ -172,7 +169,7 @@ int qp_hist           = 0;
 int stdin_interaction = 1;
 int frame_bits_per_raw_sample = 0;
 float max_error_rate  = 2.0/3;
-int filter_nbthreads = 0;
+char *filter_nbthreads;
 int filter_complex_nbthreads = 0;
 int vstats_version = 2;
 int auto_conversion_filters = 1;
@@ -267,6 +264,13 @@ static AVDictionary *strip_specifiers(AVDictionary *dict)
     return ret;
 }
 
+static int opt_filter_threads(void *optctx, const char *opt, const char *arg)
+{
+    av_free(filter_nbthreads);
+    filter_nbthreads = av_strdup(arg);
+    return 0;
+}
+
 static int opt_abort_on(void *optctx, const char *opt, const char *arg)
 {
     static const AVOption opts[] = {
@@ -571,6 +575,23 @@ static int opt_vaapi_device(void *optctx, const char *opt, const char *arg)
 }
 #endif
 
+#if CONFIG_QSV
+static int opt_qsv_device(void *optctx, const char *opt, const char *arg)
+{
+    const char *prefix = "qsv=__qsv_device:hw_any,child_device=";
+    int err;
+    char *tmp = av_asprintf("%s%s", prefix, arg);
+
+    if (!tmp)
+        return AVERROR(ENOMEM);
+
+    err = hw_device_init_from_string(tmp, NULL);
+    av_free(tmp);
+
+    return err;
+}
+#endif
+
 static int opt_init_hw_device(void *optctx, const char *opt, const char *arg)
 {
     if (!strcmp(arg, "list")) {
@@ -898,6 +919,12 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
                     "with old commandlines. This behaviour is DEPRECATED and will be removed "
                     "in the future. Please explicitly set \"-hwaccel_output_format cuda\".\n");
                 ist->hwaccel_output_format = AV_PIX_FMT_CUDA;
+            } else if (!hwaccel_output_format && hwaccel && !strcmp(hwaccel, "qsv")) {
+                av_log(NULL, AV_LOG_WARNING,
+                    "WARNING: defaulting hwaccel_output_format to qsv for compatibility "
+                    "with old commandlines. This behaviour is DEPRECATED and will be removed "
+                    "in the future. Please explicitly set \"-hwaccel_output_format qsv\".\n");
+                ist->hwaccel_output_format = AV_PIX_FMT_QSV;
             } else if (hwaccel_output_format) {
                 ist->hwaccel_output_format = av_get_pix_fmt(hwaccel_output_format);
                 if (ist->hwaccel_output_format == AV_PIX_FMT_NONE) {
@@ -1608,8 +1635,6 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e
     if (ost->enc && av_get_exact_bits_per_sample(ost->enc->id) == 24)
         av_dict_set(&ost->swr_opts, "output_sample_bits", "24", 0);
 
-    av_dict_copy(&ost->resample_opts, o->g->resample_opts, 0);
-
     ost->source_index = source_index;
     if (source_index >= 0) {
         ost->sync_ist = input_streams[source_index];
@@ -2260,23 +2285,35 @@ static int open_output_file(OptionsContext *o, const char *filename)
         if (!o->video_disable && av_guess_codec(oc->oformat, NULL, filename, NULL, AVMEDIA_TYPE_VIDEO) != AV_CODEC_ID_NONE) {
             int best_score = 0, idx = -1;
             int qcr = avformat_query_codec(oc->oformat, oc->oformat->video_codec, 0);
-            for (i = 0; i < nb_input_streams; i++) {
-                int score;
-                ist = input_streams[i];
-                score = ist->st->codecpar->width * ist->st->codecpar->height
-                           + 100000000 * !!(ist->st->event_flags & AVSTREAM_EVENT_FLAG_NEW_PACKETS)
-                           + 5000000*!!(ist->st->disposition & AV_DISPOSITION_DEFAULT);
-                if (ist->user_set_discard == AVDISCARD_ALL)
-                    continue;
-                if((qcr!=MKTAG('A', 'P', 'I', 'C')) && (ist->st->disposition & AV_DISPOSITION_ATTACHED_PIC))
-                    score = 1;
-                if (ist->st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO &&
-                    score > best_score) {
-                    if((qcr==MKTAG('A', 'P', 'I', 'C')) && !(ist->st->disposition & AV_DISPOSITION_ATTACHED_PIC))
+            for (j = 0; j < nb_input_files; j++) {
+                InputFile *ifile = input_files[j];
+                int file_best_score = 0, file_best_idx = -1;
+                for (i = 0; i < ifile->nb_streams; i++) {
+                    int score;
+                    ist = input_streams[ifile->ist_index + i];
+                    score = ist->st->codecpar->width * ist->st->codecpar->height
+                               + 100000000 * !!(ist->st->event_flags & AVSTREAM_EVENT_FLAG_NEW_PACKETS)
+                               + 5000000*!!(ist->st->disposition & AV_DISPOSITION_DEFAULT);
+                    if (ist->user_set_discard == AVDISCARD_ALL)
                         continue;
-                    best_score = score;
-                    idx = i;
+                    if((qcr!=MKTAG('A', 'P', 'I', 'C')) && (ist->st->disposition & AV_DISPOSITION_ATTACHED_PIC))
+                        score = 1;
+                    if (ist->st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO &&
+                        score > file_best_score) {
+                        if((qcr==MKTAG('A', 'P', 'I', 'C')) && !(ist->st->disposition & AV_DISPOSITION_ATTACHED_PIC))
+                            continue;
+                        file_best_score = score;
+                        file_best_idx = ifile->ist_index + i;
+                    }
                 }
+                if (file_best_idx >= 0) {
+                    if((qcr == MKTAG('A', 'P', 'I', 'C')) || !(ist->st->disposition & AV_DISPOSITION_ATTACHED_PIC))
+                        file_best_score -= 5000000*!!(input_streams[file_best_idx]->st->disposition & AV_DISPOSITION_DEFAULT);
+                    if (file_best_score > best_score) {
+                        best_score = file_best_score;
+                        idx = file_best_idx;
+                    }
+               }
             }
             if (idx >= 0)
                 new_video_stream(o, oc, idx);
@@ -2285,19 +2322,30 @@ static int open_output_file(OptionsContext *o, const char *filename)
         /* audio: most channels */
         if (!o->audio_disable && av_guess_codec(oc->oformat, NULL, filename, NULL, AVMEDIA_TYPE_AUDIO) != AV_CODEC_ID_NONE) {
             int best_score = 0, idx = -1;
-            for (i = 0; i < nb_input_streams; i++) {
-                int score;
-                ist = input_streams[i];
-                score = ist->st->codecpar->channels
-                        + 100000000 * !!(ist->st->event_flags & AVSTREAM_EVENT_FLAG_NEW_PACKETS)
-                        + 5000000*!!(ist->st->disposition & AV_DISPOSITION_DEFAULT);
-                if (ist->user_set_discard == AVDISCARD_ALL)
-                    continue;
-                if (ist->st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO &&
-                    score > best_score) {
-                    best_score = score;
-                    idx = i;
+            for (j = 0; j < nb_input_files; j++) {
+                InputFile *ifile = input_files[j];
+                int file_best_score = 0, file_best_idx = -1;
+                for (i = 0; i < ifile->nb_streams; i++) {
+                    int score;
+                    ist = input_streams[ifile->ist_index + i];
+                    score = ist->st->codecpar->channels
+                            + 100000000 * !!(ist->st->event_flags & AVSTREAM_EVENT_FLAG_NEW_PACKETS)
+                            + 5000000*!!(ist->st->disposition & AV_DISPOSITION_DEFAULT);
+                    if (ist->user_set_discard == AVDISCARD_ALL)
+                        continue;
+                    if (ist->st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO &&
+                        score > file_best_score) {
+                        file_best_score = score;
+                        file_best_idx = ifile->ist_index + i;
+                    }
                 }
+                if (file_best_idx >= 0) {
+                    file_best_score -= 5000000*!!(input_streams[file_best_idx]->st->disposition & AV_DISPOSITION_DEFAULT);
+                    if (file_best_score > best_score) {
+                        best_score = file_best_score;
+                        idx = file_best_idx;
+                    }
+               }
             }
             if (idx >= 0)
                 new_audio_stream(o, oc, idx);
@@ -3577,7 +3625,7 @@ const OptionDef options[] = {
         "set profile", "profile" },
     { "filter",         HAS_ARG | OPT_STRING | OPT_SPEC | OPT_OUTPUT, { .off = OFFSET(filters) },
         "set stream filtergraph", "filter_graph" },
-    { "filter_threads",  HAS_ARG | OPT_INT,                          { &filter_nbthreads },
+    { "filter_threads", HAS_ARG,                                     { .func_arg = opt_filter_threads },
         "number of non-complex filter threads" },
     { "filter_script",  HAS_ARG | OPT_STRING | OPT_SPEC | OPT_OUTPUT, { .off = OFFSET(filter_scripts) },
         "read stream filtergraph description from a file", "filename" },
@@ -3825,7 +3873,7 @@ const OptionDef options[] = {
 #endif
 
 #if CONFIG_QSV
-    { "qsv_device", HAS_ARG | OPT_STRING | OPT_EXPERT, { &qsv_device },
+    { "qsv_device", HAS_ARG | OPT_EXPERT, { .func_arg = opt_qsv_device },
         "set QSV hardware device (DirectX adapter index, DRM path or X11 display name)", "device"},
 #endif
 
diff --git a/fftools/ffmpeg_qsv.c b/fftools/ffmpeg_qsv.c
deleted file mode 100644 (file)
index 7bd999d..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <mfx/mfxvideo.h>
-#include <stdlib.h>
-
-#include "libavutil/dict.h"
-#include "libavutil/hwcontext.h"
-#include "libavutil/hwcontext_qsv.h"
-#include "libavutil/opt.h"
-#include "libavcodec/qsv.h"
-
-#include "ffmpeg.h"
-
-static AVBufferRef *hw_device_ctx;
-char *qsv_device = NULL;
-
-static int qsv_get_buffer(AVCodecContext *s, AVFrame *frame, int flags)
-{
-    InputStream *ist = s->opaque;
-
-    return av_hwframe_get_buffer(ist->hw_frames_ctx, frame, 0);
-}
-
-static void qsv_uninit(AVCodecContext *s)
-{
-    InputStream *ist = s->opaque;
-    av_buffer_unref(&ist->hw_frames_ctx);
-}
-
-static int qsv_device_init(InputStream *ist)
-{
-    int err;
-    AVDictionary *dict = NULL;
-
-    if (qsv_device) {
-        err = av_dict_set(&dict, "child_device", qsv_device, 0);
-        if (err < 0)
-            return err;
-    }
-
-    err = av_hwdevice_ctx_create(&hw_device_ctx, AV_HWDEVICE_TYPE_QSV,
-                                 ist->hwaccel_device, dict, 0);
-    if (err < 0) {
-        av_log(NULL, AV_LOG_ERROR, "Error creating a QSV device\n");
-        goto err_out;
-    }
-
-err_out:
-    if (dict)
-        av_dict_free(&dict);
-
-    return err;
-}
-
-int qsv_init(AVCodecContext *s)
-{
-    InputStream *ist = s->opaque;
-    AVHWFramesContext *frames_ctx;
-    AVQSVFramesContext *frames_hwctx;
-    int ret;
-
-    if (!hw_device_ctx) {
-        ret = qsv_device_init(ist);
-        if (ret < 0)
-            return ret;
-    }
-
-    av_buffer_unref(&ist->hw_frames_ctx);
-    ist->hw_frames_ctx = av_hwframe_ctx_alloc(hw_device_ctx);
-    if (!ist->hw_frames_ctx)
-        return AVERROR(ENOMEM);
-
-    frames_ctx   = (AVHWFramesContext*)ist->hw_frames_ctx->data;
-    frames_hwctx = frames_ctx->hwctx;
-
-    frames_ctx->width             = FFALIGN(s->coded_width,  32);
-    frames_ctx->height            = FFALIGN(s->coded_height, 32);
-    frames_ctx->format            = AV_PIX_FMT_QSV;
-    frames_ctx->sw_format         = s->sw_pix_fmt;
-    frames_ctx->initial_pool_size = 64 + s->extra_hw_frames;
-    frames_hwctx->frame_type      = MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET;
-
-    ret = av_hwframe_ctx_init(ist->hw_frames_ctx);
-    if (ret < 0) {
-        av_log(NULL, AV_LOG_ERROR, "Error initializing a QSV frame pool\n");
-        return ret;
-    }
-
-    ist->hwaccel_get_buffer = qsv_get_buffer;
-    ist->hwaccel_uninit     = qsv_uninit;
-
-    return 0;
-}
index 6b19574..ccea0e4 100644 (file)
@@ -1925,7 +1925,8 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c
 } while (0)
 
     if (autorotate) {
-        double theta  = get_rotation(is->video_st);
+        int32_t *displaymatrix = (int32_t *)av_stream_get_side_data(is->video_st, AV_PKT_DATA_DISPLAYMATRIX, NULL);
+        double theta = get_rotation(displaymatrix);
 
         if (fabs(theta - 90) < 1.0) {
             INSERT_FILT("transpose", "clock");
@@ -3695,8 +3696,6 @@ int main(int argc, char **argv)
 #endif
     avformat_network_init();
 
-    init_opts();
-
     signal(SIGINT , sigterm_handler); /* Interrupt (ANSI).    */
     signal(SIGTERM, sigterm_handler); /* Termination (ANSI).  */
 
index f411ba3..d8e9683 100644 (file)
@@ -2032,7 +2032,7 @@ static void print_pkt_side_data(WriterContext *w,
             print_int("dv_bl_signal_compatibility_id", dovi->dv_bl_signal_compatibility_id);
         } else if (sd->type == AV_PKT_DATA_AUDIO_SERVICE_TYPE) {
             enum AVAudioServiceType *t = (enum AVAudioServiceType *)sd->data;
-            print_int("type", *t);
+            print_int("service_type", *t);
         } else if (sd->type == AV_PKT_DATA_MPEGTS_STREAM_ID) {
             print_int("id", *sd->data);
         } else if (sd->type == AV_PKT_DATA_CPB_PROPERTIES) {
@@ -2248,8 +2248,8 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream,
     else   print_str_opt("media_type", "unknown");
     print_int("stream_index",           stream->index);
     print_int("key_frame",              frame->key_frame);
-    print_ts  ("pkt_pts",               frame->pts);
-    print_time("pkt_pts_time",          frame->pts, &stream->time_base);
+    print_ts  ("pts",                   frame->pts);
+    print_time("pts_time",              frame->pts, &stream->time_base);
     print_ts  ("pkt_dts",               frame->pkt_dts);
     print_time("pkt_dts_time",          frame->pkt_dts, &stream->time_base);
     print_ts  ("best_effort_timestamp", frame->best_effort_timestamp);
@@ -2656,6 +2656,7 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id
             print_int("coded_width",  dec_ctx->coded_width);
             print_int("coded_height", dec_ctx->coded_height);
             print_int("closed_captions", !!(dec_ctx->properties & FF_CODEC_PROPERTY_CLOSED_CAPTIONS));
+            print_int("film_grain", !!(dec_ctx->properties & FF_CODEC_PROPERTY_FILM_GRAIN));
         }
         print_int("has_b_frames", par->video_delay);
         sar = av_guess_sample_aspect_ratio(fmt_ctx, stream, NULL);
@@ -2843,10 +2844,6 @@ static int show_program(WriterContext *w, InputFile *ifile, AVProgram *program)
     print_int("nb_streams", program->nb_stream_indexes);
     print_int("pmt_pid", program->pmt_pid);
     print_int("pcr_pid", program->pcr_pid);
-    print_ts("start_pts", program->start_time);
-    print_time("start_time", program->start_time, &AV_TIME_BASE_Q);
-    print_ts("end_pts", program->end_time);
-    print_time("end_time", program->end_time, &AV_TIME_BASE_Q);
     if (do_show_program_tags)
         ret = show_tags(w, program->metadata, SECTION_ID_PROGRAM_TAGS);
     if (ret < 0)
@@ -3721,7 +3718,6 @@ int main(int argc, char **argv)
     options = real_options;
     parse_loglevel(argc, argv, options);
     avformat_network_init();
-    init_opts();
 #if CONFIG_AVDEVICE
     avdevice_register_all();
 #endif
index be64c82..11873ee 100644 (file)
@@ -367,7 +367,7 @@ OBJS-$(CONFIG_H264_DECODER)            += h264dec.o h264_cabac.o h264_cavlc.o \
                                           h264_direct.o h264_loopfilter.o  \
                                           h264_mb.o h264_picture.o \
                                           h264_refs.o h264_sei.o \
-                                          h264_slice.o h264data.o
+                                          h264_slice.o h264data.o h274.o
 OBJS-$(CONFIG_H264_AMF_ENCODER)        += amfenc_h264.o
 OBJS-$(CONFIG_H264_CUVID_DECODER)      += cuviddec.o
 OBJS-$(CONFIG_H264_MEDIACODEC_DECODER) += mediacodecdec.o
@@ -508,6 +508,7 @@ OBJS-$(CONFIG_MSMPEG4V2_DECODER)       += msmpeg4dec.o msmpeg4.o msmpeg4data.o
 OBJS-$(CONFIG_MSMPEG4V2_ENCODER)       += msmpeg4enc.o msmpeg4.o msmpeg4data.o
 OBJS-$(CONFIG_MSMPEG4V3_DECODER)       += msmpeg4dec.o msmpeg4.o msmpeg4data.o
 OBJS-$(CONFIG_MSMPEG4V3_ENCODER)       += msmpeg4enc.o msmpeg4.o msmpeg4data.o
+OBJS-$(CONFIG_MSNSIREN_DECODER)        += siren.o
 OBJS-$(CONFIG_MSP2_DECODER)            += msp2dec.o
 OBJS-$(CONFIG_MSRLE_DECODER)           += msrle.o msrledec.o
 OBJS-$(CONFIG_MSS1_DECODER)            += mss1.o mss12.o
@@ -621,6 +622,7 @@ OBJS-$(CONFIG_SIMBIOSIS_IMX_DECODER)   += imx.o
 OBJS-$(CONFIG_SMACKAUD_DECODER)        += smacker.o
 OBJS-$(CONFIG_SMACKER_DECODER)         += smacker.o
 OBJS-$(CONFIG_SMC_DECODER)             += smc.o
+OBJS-$(CONFIG_SMC_ENCODER)             += smcenc.o
 OBJS-$(CONFIG_SNOW_DECODER)            += snowdec.o snow.o snow_dwt.o
 OBJS-$(CONFIG_SNOW_ENCODER)            += snowenc.o snow.o snow_dwt.o             \
                                           h263.o h263data.o ituh263enc.o
@@ -1181,7 +1183,6 @@ SLIBOBJS-$(HAVE_GNU_WINDRES)           += avcodecres.o
 
 SKIPHEADERS                            += %_tablegen.h                  \
                                           %_tables.h                    \
-                                          fft-internal.h                \
                                           tableprint.h                  \
                                           tableprint_vlc.h              \
                                           aaccoder_twoloop.h            \
index e94475a..a3c680b 100644 (file)
@@ -30,7 +30,6 @@
 #include "libavutil/softfloat.h"
 
 #define FFT_FLOAT    0
-#define FFT_FIXED_32 1
 
 #define AAC_RENAME(x)       x ## _fixed
 #define AAC_RENAME_32(x)    x ## _fixed_32
@@ -80,7 +79,6 @@ typedef int                 AAC_SIGNE;
 #else
 
 #define FFT_FLOAT    1
-#define FFT_FIXED_32 0
 
 #define AAC_RENAME(x)       x
 #define AAC_RENAME_32(x)    x
index baa8248..11b0559 100644 (file)
@@ -843,25 +843,25 @@ static void search_for_ms(AACEncContext *s, ChannelElement *cpe)
                                                     sce0->ics.swb_sizes[g],
                                                     sce0->sf_idx[w*16+g],
                                                     sce0->band_type[w*16+g],
-                                                    lambda / band0->threshold, INFINITY, &b1, NULL, 0);
+                                                    lambda / (band0->threshold + FLT_MIN), INFINITY, &b1, NULL, 0);
                         dist1 += quantize_band_cost(s, &sce1->coeffs[start + (w+w2)*128],
                                                     R34,
                                                     sce1->ics.swb_sizes[g],
                                                     sce1->sf_idx[w*16+g],
                                                     sce1->band_type[w*16+g],
-                                                    lambda / band1->threshold, INFINITY, &b2, NULL, 0);
+                                                    lambda / (band1->threshold + FLT_MIN), INFINITY, &b2, NULL, 0);
                         dist2 += quantize_band_cost(s, M,
                                                     M34,
                                                     sce0->ics.swb_sizes[g],
                                                     mididx,
                                                     midcb,
-                                                    lambda / minthr, INFINITY, &b3, NULL, 0);
+                                                    lambda / (minthr + FLT_MIN), INFINITY, &b3, NULL, 0);
                         dist2 += quantize_band_cost(s, S,
                                                     S34,
                                                     sce1->ics.swb_sizes[g],
                                                     sididx,
                                                     sidcb,
-                                                    mslambda / (minthr * bmax), INFINITY, &b4, NULL, 0);
+                                                    mslambda / (minthr * bmax + FLT_MIN), INFINITY, &b4, NULL, 0);
                         B0 += b1+b2;
                         B1 += b3+b4;
                         dist1 -= b1+b2;
index 3ce5330..4dfb38a 100644 (file)
@@ -33,7 +33,6 @@
  */
 
 #define FFT_FLOAT 1
-#define FFT_FIXED_32 0
 #define USE_FIXED 0
 
 #include "libavutil/float_dsp.h"
index 00257a5..cad2fd6 100644 (file)
@@ -59,7 +59,6 @@
  */
 
 #define FFT_FLOAT 0
-#define FFT_FIXED_32 1
 #define USE_FIXED 1
 
 #include "libavutil/fixed_dsp.h"
index 6c7a33f..655e8fe 100644 (file)
@@ -51,7 +51,8 @@ static void ipdopd_reset(int8_t *ipd_hist, int8_t *opd_hist)
 
 /** Split one subband into 2 subsubbands with a symmetric real filter.
  * The filter must have its non-center even coefficients equal to zero. */
-static void hybrid2_re(INTFLOAT (*in)[2], INTFLOAT (*out)[32][2], const INTFLOAT filter[8], int len, int reverse)
+static void hybrid2_re(INTFLOAT (*in)[2], INTFLOAT (*out)[32][2],
+                       const INTFLOAT filter[7], int len, int reverse)
 {
     int i, j;
     for (i = 0; i < len; i++, in++) {
index d5baccf..6bf3ecb 100644 (file)
@@ -69,19 +69,42 @@ void ff_h264_idct_add_neon(uint8_t *dst, int16_t *block, int stride);
 void ff_h264_idct_dc_add_neon(uint8_t *dst, int16_t *block, int stride);
 void ff_h264_idct_add16_neon(uint8_t *dst, const int *block_offset,
                              int16_t *block, int stride,
-                             const uint8_t nnzc[6*8]);
+                             const uint8_t nnzc[5 * 8]);
 void ff_h264_idct_add16intra_neon(uint8_t *dst, const int *block_offset,
                                   int16_t *block, int stride,
-                                  const uint8_t nnzc[6*8]);
+                                  const uint8_t nnzc[5 * 8]);
 void ff_h264_idct_add8_neon(uint8_t **dest, const int *block_offset,
                             int16_t *block, int stride,
-                            const uint8_t nnzc[6*8]);
+                            const uint8_t nnzc[15 * 8]);
 
 void ff_h264_idct8_add_neon(uint8_t *dst, int16_t *block, int stride);
 void ff_h264_idct8_dc_add_neon(uint8_t *dst, int16_t *block, int stride);
 void ff_h264_idct8_add4_neon(uint8_t *dst, const int *block_offset,
                              int16_t *block, int stride,
-                             const uint8_t nnzc[6*8]);
+                             const uint8_t nnzc[5 * 8]);
+
+void ff_h264_v_loop_filter_luma_neon_10(uint8_t *pix, ptrdiff_t stride, int alpha,
+                                        int beta, int8_t *tc0);
+void ff_h264_h_loop_filter_luma_neon_10(uint8_t *pix, ptrdiff_t stride, int alpha,
+                                        int beta, int8_t *tc0);
+void ff_h264_v_loop_filter_luma_intra_neon_10(uint8_t *pix, ptrdiff_t stride, int alpha,
+                                              int beta);
+void ff_h264_h_loop_filter_luma_intra_neon_10(uint8_t *pix, ptrdiff_t stride, int alpha,
+                                              int beta);
+void ff_h264_v_loop_filter_chroma_neon_10(uint8_t *pix, ptrdiff_t stride, int alpha,
+                                          int beta, int8_t *tc0);
+void ff_h264_h_loop_filter_chroma_neon_10(uint8_t *pix, ptrdiff_t stride, int alpha,
+                                          int beta, int8_t *tc0);
+void ff_h264_h_loop_filter_chroma422_neon_10(uint8_t *pix, ptrdiff_t stride, int alpha,
+                                             int beta, int8_t *tc0);
+void ff_h264_v_loop_filter_chroma_intra_neon_10(uint8_t *pix, ptrdiff_t stride,
+                                                int alpha, int beta);
+void ff_h264_h_loop_filter_chroma_intra_neon_10(uint8_t *pix, ptrdiff_t stride,
+                                                int alpha, int beta);
+void ff_h264_h_loop_filter_chroma422_intra_neon_10(uint8_t *pix, ptrdiff_t stride,
+                                                   int alpha, int beta);
+void ff_h264_h_loop_filter_chroma_mbaff_intra_neon_10(uint8_t *pix, ptrdiff_t stride,
+                                                      int alpha, int beta);
 
 av_cold void ff_h264dsp_init_aarch64(H264DSPContext *c, const int bit_depth,
                                      const int chroma_format_idc)
@@ -125,5 +148,19 @@ av_cold void ff_h264dsp_init_aarch64(H264DSPContext *c, const int bit_depth,
         c->h264_idct8_add       = ff_h264_idct8_add_neon;
         c->h264_idct8_dc_add    = ff_h264_idct8_dc_add_neon;
         c->h264_idct8_add4      = ff_h264_idct8_add4_neon;
+    } else if (have_neon(cpu_flags) && bit_depth == 10) {
+        c->h264_v_loop_filter_chroma = ff_h264_v_loop_filter_chroma_neon_10;
+        c->h264_v_loop_filter_chroma_intra = ff_h264_v_loop_filter_chroma_intra_neon_10;
+
+        if (chroma_format_idc <= 1) {
+            c->h264_h_loop_filter_chroma = ff_h264_h_loop_filter_chroma_neon_10;
+            c->h264_h_loop_filter_chroma_intra = ff_h264_h_loop_filter_chroma_intra_neon_10;
+            c->h264_h_loop_filter_chroma_mbaff_intra = ff_h264_h_loop_filter_chroma_mbaff_intra_neon_10;
+        } else {
+            c->h264_h_loop_filter_chroma = ff_h264_h_loop_filter_chroma422_neon_10;
+            c->h264_h_loop_filter_chroma_mbaff = ff_h264_h_loop_filter_chroma_neon_10;
+            c->h264_h_loop_filter_chroma_intra = ff_h264_h_loop_filter_chroma422_intra_neon_10;
+            c->h264_h_loop_filter_chroma_mbaff_intra = ff_h264_h_loop_filter_chroma_intra_neon_10;
+        }
     }
 }
index fbb8ecc..000ff76 100644 (file)
 
 function ff_h264_v_loop_filter_luma_neon, export=1
         h264_loop_filter_start
-        sxtw            x1,  w1
 
         ld1             {v0.16B},  [x0], x1
         ld1             {v2.16B},  [x0], x1
@@ -134,7 +133,6 @@ endfunc
 
 function ff_h264_h_loop_filter_luma_neon, export=1
         h264_loop_filter_start
-        sxtw            x1,  w1
 
         sub             x0,  x0,  #4
         ld1             {v6.8B},  [x0], x1
@@ -184,199 +182,198 @@ endfunc
 
 
 .macro h264_loop_filter_start_intra
-    orr             w4,  w2,  w3
-    cbnz            w4,  1f
-    ret
+        orr             w4,  w2,  w3
+        cbnz            w4,  1f
+        ret
 1:
-    sxtw            x1,  w1
-    dup             v30.16b, w2                // alpha
-    dup             v31.16b, w3                // beta
+        dup             v30.16b, w2                // alpha
+        dup             v31.16b, w3                // beta
 .endm
 
 .macro h264_loop_filter_luma_intra
-    uabd            v16.16b, v7.16b,  v0.16b        // abs(p0 - q0)
-    uabd            v17.16b, v6.16b,  v7.16b        // abs(p1 - p0)
-    uabd            v18.16b, v1.16b,  v0.16b        // abs(q1 - q0)
-    cmhi            v19.16b, v30.16b, v16.16b       // < alpha
-    cmhi            v17.16b, v31.16b, v17.16b       // < beta
-    cmhi            v18.16b, v31.16b, v18.16b       // < beta
-
-    movi            v29.16b, #2
-    ushr            v30.16b, v30.16b, #2            // alpha >> 2
-    add             v30.16b, v30.16b, v29.16b       // (alpha >> 2) + 2
-    cmhi            v16.16b, v30.16b, v16.16b       // < (alpha >> 2) + 2
-
-    and             v19.16b, v19.16b, v17.16b
-    and             v19.16b, v19.16b, v18.16b
-    shrn            v20.8b,  v19.8h,  #4
-    mov             x4, v20.d[0]
-    cbz             x4, 9f
-
-    ushll           v20.8h,  v6.8b,   #1
-    ushll           v22.8h,  v1.8b,   #1
-    ushll2          v21.8h,  v6.16b,  #1
-    ushll2          v23.8h,  v1.16b,  #1
-    uaddw           v20.8h,  v20.8h,  v7.8b
-    uaddw           v22.8h,  v22.8h,  v0.8b
-    uaddw2          v21.8h,  v21.8h,  v7.16b
-    uaddw2          v23.8h,  v23.8h,  v0.16b
-    uaddw           v20.8h,  v20.8h,  v1.8b
-    uaddw           v22.8h,  v22.8h,  v6.8b
-    uaddw2          v21.8h,  v21.8h,  v1.16b
-    uaddw2          v23.8h,  v23.8h,  v6.16b
-
-    rshrn           v24.8b,  v20.8h,  #2 // p0'_1
-    rshrn           v25.8b,  v22.8h,  #2 // q0'_1
-    rshrn2          v24.16b, v21.8h,  #2 // p0'_1
-    rshrn2          v25.16b, v23.8h,  #2 // q0'_1
-
-    uabd            v17.16b, v5.16b,  v7.16b        // abs(p2 - p0)
-    uabd            v18.16b, v2.16b,  v0.16b        // abs(q2 - q0)
-    cmhi            v17.16b, v31.16b, v17.16b       // < beta
-    cmhi            v18.16b, v31.16b, v18.16b       // < beta
-
-    and             v17.16b, v16.16b, v17.16b  // if_2 && if_3
-    and             v18.16b, v16.16b, v18.16b  // if_2 && if_4
-
-    not             v30.16b, v17.16b
-    not             v31.16b, v18.16b
-
-    and             v30.16b, v30.16b, v19.16b  // if_1 && !(if_2 && if_3)
-    and             v31.16b, v31.16b, v19.16b  // if_1 && !(if_2 && if_4)
-
-    and             v17.16b, v19.16b, v17.16b  // if_1 && if_2 && if_3
-    and             v18.16b, v19.16b, v18.16b  // if_1 && if_2 && if_4
-
-    //calc            p, v7, v6, v5, v4, v17, v7, v6, v5, v4
-    uaddl           v26.8h,  v5.8b,   v7.8b
-    uaddl2          v27.8h,  v5.16b,  v7.16b
-    uaddw           v26.8h,  v26.8h,  v0.8b
-    uaddw2          v27.8h,  v27.8h,  v0.16b
-    add             v20.8h,  v20.8h,  v26.8h
-    add             v21.8h,  v21.8h,  v27.8h
-    uaddw           v20.8h,  v20.8h,  v0.8b
-    uaddw2          v21.8h,  v21.8h,  v0.16b
-    rshrn           v20.8b,  v20.8h,  #3 // p0'_2
-    rshrn2          v20.16b, v21.8h,  #3 // p0'_2
-    uaddw           v26.8h,  v26.8h,  v6.8b
-    uaddw2          v27.8h,  v27.8h,  v6.16b
-    rshrn           v21.8b,  v26.8h,  #2 // p1'_2
-    rshrn2          v21.16b, v27.8h,  #2 // p1'_2
-    uaddl           v28.8h,  v4.8b,   v5.8b
-    uaddl2          v29.8h,  v4.16b,  v5.16b
-    shl             v28.8h,  v28.8h,  #1
-    shl             v29.8h,  v29.8h,  #1
-    add             v28.8h,  v28.8h,  v26.8h
-    add             v29.8h,  v29.8h,  v27.8h
-    rshrn           v19.8b,  v28.8h,  #3 // p2'_2
-    rshrn2          v19.16b, v29.8h,  #3 // p2'_2
-
-    //calc            q, v0, v1, v2, v3, v18, v0, v1, v2, v3
-    uaddl           v26.8h,  v2.8b,   v0.8b
-    uaddl2          v27.8h,  v2.16b,  v0.16b
-    uaddw           v26.8h,  v26.8h,  v7.8b
-    uaddw2          v27.8h,  v27.8h,  v7.16b
-    add             v22.8h,  v22.8h,  v26.8h
-    add             v23.8h,  v23.8h,  v27.8h
-    uaddw           v22.8h,  v22.8h,  v7.8b
-    uaddw2          v23.8h,  v23.8h,  v7.16b
-    rshrn           v22.8b,  v22.8h,  #3 // q0'_2
-    rshrn2          v22.16b, v23.8h,  #3 // q0'_2
-    uaddw           v26.8h,  v26.8h,  v1.8b
-    uaddw2          v27.8h,  v27.8h,  v1.16b
-    rshrn           v23.8b,  v26.8h,  #2 // q1'_2
-    rshrn2          v23.16b, v27.8h,  #2 // q1'_2
-    uaddl           v28.8h,  v2.8b,   v3.8b
-    uaddl2          v29.8h,  v2.16b,  v3.16b
-    shl             v28.8h,  v28.8h,  #1
-    shl             v29.8h,  v29.8h,  #1
-    add             v28.8h,  v28.8h,  v26.8h
-    add             v29.8h,  v29.8h,  v27.8h
-    rshrn           v26.8b,  v28.8h,  #3 // q2'_2
-    rshrn2          v26.16b, v29.8h,  #3 // q2'_2
-
-    bit             v7.16b,  v24.16b, v30.16b  // p0'_1
-    bit             v0.16b,  v25.16b, v31.16b  // q0'_1
-    bit             v7.16b, v20.16b,  v17.16b  // p0'_2
-    bit             v6.16b, v21.16b,  v17.16b  // p1'_2
-    bit             v5.16b, v19.16b,  v17.16b  // p2'_2
-    bit             v0.16b, v22.16b,  v18.16b  // q0'_2
-    bit             v1.16b, v23.16b,  v18.16b  // q1'_2
-    bit             v2.16b, v26.16b,  v18.16b  // q2'_2
+        uabd            v16.16b, v7.16b,  v0.16b        // abs(p0 - q0)
+        uabd            v17.16b, v6.16b,  v7.16b        // abs(p1 - p0)
+        uabd            v18.16b, v1.16b,  v0.16b        // abs(q1 - q0)
+        cmhi            v19.16b, v30.16b, v16.16b       // < alpha
+        cmhi            v17.16b, v31.16b, v17.16b       // < beta
+        cmhi            v18.16b, v31.16b, v18.16b       // < beta
+
+        movi            v29.16b, #2
+        ushr            v30.16b, v30.16b, #2            // alpha >> 2
+        add             v30.16b, v30.16b, v29.16b       // (alpha >> 2) + 2
+        cmhi            v16.16b, v30.16b, v16.16b       // < (alpha >> 2) + 2
+
+        and             v19.16b, v19.16b, v17.16b
+        and             v19.16b, v19.16b, v18.16b
+        shrn            v20.8b,  v19.8h,  #4
+        mov             x4, v20.d[0]
+        cbz             x4, 9f
+
+        ushll           v20.8h,  v6.8b,   #1
+        ushll           v22.8h,  v1.8b,   #1
+        ushll2          v21.8h,  v6.16b,  #1
+        ushll2          v23.8h,  v1.16b,  #1
+        uaddw           v20.8h,  v20.8h,  v7.8b
+        uaddw           v22.8h,  v22.8h,  v0.8b
+        uaddw2          v21.8h,  v21.8h,  v7.16b
+        uaddw2          v23.8h,  v23.8h,  v0.16b
+        uaddw           v20.8h,  v20.8h,  v1.8b
+        uaddw           v22.8h,  v22.8h,  v6.8b
+        uaddw2          v21.8h,  v21.8h,  v1.16b
+        uaddw2          v23.8h,  v23.8h,  v6.16b
+
+        rshrn           v24.8b,  v20.8h,  #2 // p0'_1
+        rshrn           v25.8b,  v22.8h,  #2 // q0'_1
+        rshrn2          v24.16b, v21.8h,  #2 // p0'_1
+        rshrn2          v25.16b, v23.8h,  #2 // q0'_1
+
+        uabd            v17.16b, v5.16b,  v7.16b        // abs(p2 - p0)
+        uabd            v18.16b, v2.16b,  v0.16b        // abs(q2 - q0)
+        cmhi            v17.16b, v31.16b, v17.16b       // < beta
+        cmhi            v18.16b, v31.16b, v18.16b       // < beta
+
+        and             v17.16b, v16.16b, v17.16b  // if_2 && if_3
+        and             v18.16b, v16.16b, v18.16b  // if_2 && if_4
+
+        not             v30.16b, v17.16b
+        not             v31.16b, v18.16b
+
+        and             v30.16b, v30.16b, v19.16b  // if_1 && !(if_2 && if_3)
+        and             v31.16b, v31.16b, v19.16b  // if_1 && !(if_2 && if_4)
+
+        and             v17.16b, v19.16b, v17.16b  // if_1 && if_2 && if_3
+        and             v18.16b, v19.16b, v18.16b  // if_1 && if_2 && if_4
+
+        //calc            p, v7, v6, v5, v4, v17, v7, v6, v5, v4
+        uaddl           v26.8h,  v5.8b,   v7.8b
+        uaddl2          v27.8h,  v5.16b,  v7.16b
+        uaddw           v26.8h,  v26.8h,  v0.8b
+        uaddw2          v27.8h,  v27.8h,  v0.16b
+        add             v20.8h,  v20.8h,  v26.8h
+        add             v21.8h,  v21.8h,  v27.8h
+        uaddw           v20.8h,  v20.8h,  v0.8b
+        uaddw2          v21.8h,  v21.8h,  v0.16b
+        rshrn           v20.8b,  v20.8h,  #3 // p0'_2
+        rshrn2          v20.16b, v21.8h,  #3 // p0'_2
+        uaddw           v26.8h,  v26.8h,  v6.8b
+        uaddw2          v27.8h,  v27.8h,  v6.16b
+        rshrn           v21.8b,  v26.8h,  #2 // p1'_2
+        rshrn2          v21.16b, v27.8h,  #2 // p1'_2
+        uaddl           v28.8h,  v4.8b,   v5.8b
+        uaddl2          v29.8h,  v4.16b,  v5.16b
+        shl             v28.8h,  v28.8h,  #1
+        shl             v29.8h,  v29.8h,  #1
+        add             v28.8h,  v28.8h,  v26.8h
+        add             v29.8h,  v29.8h,  v27.8h
+        rshrn           v19.8b,  v28.8h,  #3 // p2'_2
+        rshrn2          v19.16b, v29.8h,  #3 // p2'_2
+
+        //calc            q, v0, v1, v2, v3, v18, v0, v1, v2, v3
+        uaddl           v26.8h,  v2.8b,   v0.8b
+        uaddl2          v27.8h,  v2.16b,  v0.16b
+        uaddw           v26.8h,  v26.8h,  v7.8b
+        uaddw2          v27.8h,  v27.8h,  v7.16b
+        add             v22.8h,  v22.8h,  v26.8h
+        add             v23.8h,  v23.8h,  v27.8h
+        uaddw           v22.8h,  v22.8h,  v7.8b
+        uaddw2          v23.8h,  v23.8h,  v7.16b
+        rshrn           v22.8b,  v22.8h,  #3 // q0'_2
+        rshrn2          v22.16b, v23.8h,  #3 // q0'_2
+        uaddw           v26.8h,  v26.8h,  v1.8b
+        uaddw2          v27.8h,  v27.8h,  v1.16b
+        rshrn           v23.8b,  v26.8h,  #2 // q1'_2
+        rshrn2          v23.16b, v27.8h,  #2 // q1'_2
+        uaddl           v28.8h,  v2.8b,   v3.8b
+        uaddl2          v29.8h,  v2.16b,  v3.16b
+        shl             v28.8h,  v28.8h,  #1
+        shl             v29.8h,  v29.8h,  #1
+        add             v28.8h,  v28.8h,  v26.8h
+        add             v29.8h,  v29.8h,  v27.8h
+        rshrn           v26.8b,  v28.8h,  #3 // q2'_2
+        rshrn2          v26.16b, v29.8h,  #3 // q2'_2
+
+        bit             v7.16b,  v24.16b, v30.16b  // p0'_1
+        bit             v0.16b,  v25.16b, v31.16b  // q0'_1
+        bit             v7.16b,  v20.16b, v17.16b  // p0'_2
+        bit             v6.16b,  v21.16b, v17.16b  // p1'_2
+        bit             v5.16b,  v19.16b, v17.16b  // p2'_2
+        bit             v0.16b,  v22.16b, v18.16b  // q0'_2
+        bit             v1.16b,  v23.16b, v18.16b  // q1'_2
+        bit             v2.16b,  v26.16b, v18.16b  // q2'_2
 .endm
 
 function ff_h264_v_loop_filter_luma_intra_neon, export=1
-    h264_loop_filter_start_intra
-
-    ld1             {v0.16b},  [x0], x1 // q0
-    ld1             {v1.16b},  [x0], x1 // q1
-    ld1             {v2.16b},  [x0], x1 // q2
-    ld1             {v3.16b},  [x0], x1 // q3
-    sub             x0,  x0,  x1, lsl #3
-    ld1             {v4.16b},  [x0], x1 // p3
-    ld1             {v5.16b},  [x0], x1 // p2
-    ld1             {v6.16b},  [x0], x1 // p1
-    ld1             {v7.16b},  [x0]     // p0
-
-    h264_loop_filter_luma_intra
-
-    sub             x0,  x0,  x1, lsl #1
-    st1             {v5.16b}, [x0], x1  // p2
-    st1             {v6.16b}, [x0], x1  // p1
-    st1             {v7.16b}, [x0], x1  // p0
-    st1             {v0.16b}, [x0], x1  // q0
-    st1             {v1.16b}, [x0], x1  // q1
-    st1             {v2.16b}, [x0]      // q2
+        h264_loop_filter_start_intra
+
+        ld1             {v0.16b},  [x0], x1 // q0
+        ld1             {v1.16b},  [x0], x1 // q1
+        ld1             {v2.16b},  [x0], x1 // q2
+        ld1             {v3.16b},  [x0], x1 // q3
+        sub             x0,  x0,  x1, lsl #3
+        ld1             {v4.16b},  [x0], x1 // p3
+        ld1             {v5.16b},  [x0], x1 // p2
+        ld1             {v6.16b},  [x0], x1 // p1
+        ld1             {v7.16b},  [x0]     // p0
+
+        h264_loop_filter_luma_intra
+
+        sub             x0,  x0,  x1, lsl #1
+        st1             {v5.16b}, [x0], x1  // p2
+        st1             {v6.16b}, [x0], x1  // p1
+        st1             {v7.16b}, [x0], x1  // p0
+        st1             {v0.16b}, [x0], x1  // q0
+        st1             {v1.16b}, [x0], x1  // q1
+        st1             {v2.16b}, [x0]      // q2
 9:
-    ret
+        ret
 endfunc
 
 function ff_h264_h_loop_filter_luma_intra_neon, export=1
-    h264_loop_filter_start_intra
-
-    sub             x0,  x0,  #4
-    ld1             {v4.8b},  [x0], x1
-    ld1             {v5.8b},  [x0], x1
-    ld1             {v6.8b},  [x0], x1
-    ld1             {v7.8b},  [x0], x1
-    ld1             {v0.8b},  [x0], x1
-    ld1             {v1.8b},  [x0], x1
-    ld1             {v2.8b},  [x0], x1
-    ld1             {v3.8b},  [x0], x1
-    ld1             {v4.d}[1],  [x0], x1
-    ld1             {v5.d}[1],  [x0], x1
-    ld1             {v6.d}[1],  [x0], x1
-    ld1             {v7.d}[1],  [x0], x1
-    ld1             {v0.d}[1],  [x0], x1
-    ld1             {v1.d}[1],  [x0], x1
-    ld1             {v2.d}[1],  [x0], x1
-    ld1             {v3.d}[1],  [x0], x1
-
-    transpose_8x16B v4, v5, v6, v7, v0, v1, v2, v3, v21, v23
-
-    h264_loop_filter_luma_intra
-
-    transpose_8x16B v4, v5, v6, v7, v0, v1, v2, v3, v21, v23
-
-    sub             x0,  x0,  x1, lsl #4
-    st1             {v4.8b},  [x0], x1
-    st1             {v5.8b},  [x0], x1
-    st1             {v6.8b},  [x0], x1
-    st1             {v7.8b},  [x0], x1
-    st1             {v0.8b},  [x0], x1
-    st1             {v1.8b},  [x0], x1
-    st1             {v2.8b},  [x0], x1
-    st1             {v3.8b},  [x0], x1
-    st1             {v4.d}[1],  [x0], x1
-    st1             {v5.d}[1],  [x0], x1
-    st1             {v6.d}[1],  [x0], x1
-    st1             {v7.d}[1],  [x0], x1
-    st1             {v0.d}[1],  [x0], x1
-    st1             {v1.d}[1],  [x0], x1
-    st1             {v2.d}[1],  [x0], x1
-    st1             {v3.d}[1],  [x0], x1
+        h264_loop_filter_start_intra
+
+        sub             x0,  x0,  #4
+        ld1             {v4.8b},  [x0], x1
+        ld1             {v5.8b},  [x0], x1
+        ld1             {v6.8b},  [x0], x1
+        ld1             {v7.8b},  [x0], x1
+        ld1             {v0.8b},  [x0], x1
+        ld1             {v1.8b},  [x0], x1
+        ld1             {v2.8b},  [x0], x1
+        ld1             {v3.8b},  [x0], x1
+        ld1             {v4.d}[1],  [x0], x1
+        ld1             {v5.d}[1],  [x0], x1
+        ld1             {v6.d}[1],  [x0], x1
+        ld1             {v7.d}[1],  [x0], x1
+        ld1             {v0.d}[1],  [x0], x1
+        ld1             {v1.d}[1],  [x0], x1
+        ld1             {v2.d}[1],  [x0], x1
+        ld1             {v3.d}[1],  [x0], x1
+
+        transpose_8x16B v4, v5, v6, v7, v0, v1, v2, v3, v21, v23
+
+        h264_loop_filter_luma_intra
+
+        transpose_8x16B v4, v5, v6, v7, v0, v1, v2, v3, v21, v23
+
+        sub             x0,  x0,  x1, lsl #4
+        st1             {v4.8b},  [x0], x1
+        st1             {v5.8b},  [x0], x1
+        st1             {v6.8b},  [x0], x1
+        st1             {v7.8b},  [x0], x1
+        st1             {v0.8b},  [x0], x1
+        st1             {v1.8b},  [x0], x1
+        st1             {v2.8b},  [x0], x1
+        st1             {v3.8b},  [x0], x1
+        st1             {v4.d}[1],  [x0], x1
+        st1             {v5.d}[1],  [x0], x1
+        st1             {v6.d}[1],  [x0], x1
+        st1             {v7.d}[1],  [x0], x1
+        st1             {v0.d}[1],  [x0], x1
+        st1             {v1.d}[1],  [x0], x1
+        st1             {v2.d}[1],  [x0], x1
+        st1             {v3.d}[1],  [x0], x1
 9:
-    ret
+        ret
 endfunc
 
 .macro  h264_loop_filter_chroma
@@ -414,7 +411,6 @@ endfunc
 
 function ff_h264_v_loop_filter_chroma_neon, export=1
         h264_loop_filter_start
-        sxtw            x1,  w1
 
         sub             x0,  x0,  x1, lsl #1
         ld1             {v18.8B}, [x0], x1
@@ -433,7 +429,6 @@ endfunc
 
 function ff_h264_h_loop_filter_chroma_neon, export=1
         h264_loop_filter_start
-        sxtw            x1,  w1
 
         sub             x0,  x0,  #2
 h_loop_filter_chroma420:
@@ -466,7 +461,6 @@ h_loop_filter_chroma420:
 endfunc
 
 function ff_h264_h_loop_filter_chroma422_neon, export=1
-        sxtw            x1,  w1
         h264_loop_filter_start
         add             x5,  x0,  x1
         sub             x0,  x0,  #2
@@ -480,113 +474,113 @@ function ff_h264_h_loop_filter_chroma422_neon, export=1
 endfunc
 
 .macro h264_loop_filter_chroma_intra
-    uabd            v26.8b, v16.8b, v17.8b  // abs(p0 - q0)
-    uabd            v27.8b, v18.8b, v16.8b  // abs(p1 - p0)
-    uabd            v28.8b, v19.8b, v17.8b  // abs(q1 - q0)
-    cmhi            v26.8b, v30.8b, v26.8b  // < alpha
-    cmhi            v27.8b, v31.8b, v27.8b  // < beta
-    cmhi            v28.8b, v31.8b, v28.8b  // < beta
-    and             v26.8b, v26.8b, v27.8b
-    and             v26.8b, v26.8b, v28.8b
-    mov             x2, v26.d[0]
-
-    ushll           v4.8h,   v18.8b,  #1
-    ushll           v6.8h,   v19.8b,  #1
-    cbz             x2, 9f
-    uaddl           v20.8h,  v16.8b,  v19.8b
-    uaddl           v22.8h,  v17.8b,  v18.8b
-    add             v20.8h,  v20.8h,  v4.8h
-    add             v22.8h,  v22.8h,  v6.8h
-    uqrshrn         v24.8b,  v20.8h,  #2
-    uqrshrn         v25.8b,  v22.8h,  #2
-    bit             v16.8b, v24.8b, v26.8b
-    bit             v17.8b, v25.8b, v26.8b
+        uabd            v26.8b,  v16.8b,  v17.8b  // abs(p0 - q0)
+        uabd            v27.8b,  v18.8b,  v16.8b  // abs(p1 - p0)
+        uabd            v28.8b,  v19.8b,  v17.8b  // abs(q1 - q0)
+        cmhi            v26.8b,  v30.8b,  v26.8b  // < alpha
+        cmhi            v27.8b,  v31.8b,  v27.8b  // < beta
+        cmhi            v28.8b,  v31.8b,  v28.8b  // < beta
+        and             v26.8b,  v26.8b,  v27.8b
+        and             v26.8b,  v26.8b,  v28.8b
+        mov             x2, v26.d[0]
+
+        ushll           v4.8h,   v18.8b,  #1
+        ushll           v6.8h,   v19.8b,  #1
+        cbz             x2, 9f
+        uaddl           v20.8h,  v16.8b,  v19.8b
+        uaddl           v22.8h,  v17.8b,  v18.8b
+        add             v20.8h,  v20.8h,  v4.8h
+        add             v22.8h,  v22.8h,  v6.8h
+        uqrshrn         v24.8b,  v20.8h,  #2
+        uqrshrn         v25.8b,  v22.8h,  #2
+        bit             v16.8b,  v24.8b,  v26.8b
+        bit             v17.8b,  v25.8b,  v26.8b
 .endm
 
 function ff_h264_v_loop_filter_chroma_intra_neon, export=1
-    h264_loop_filter_start_intra
+        h264_loop_filter_start_intra
 
-    sub             x0,  x0,  x1, lsl #1
-    ld1             {v18.8b}, [x0], x1
-    ld1             {v16.8b}, [x0], x1
-    ld1             {v17.8b}, [x0], x1
-    ld1             {v19.8b}, [x0]
+        sub             x0,  x0,  x1, lsl #1
+        ld1             {v18.8b}, [x0], x1
+        ld1             {v16.8b}, [x0], x1
+        ld1             {v17.8b}, [x0], x1
+        ld1             {v19.8b}, [x0]
 
-    h264_loop_filter_chroma_intra
+        h264_loop_filter_chroma_intra
 
-    sub             x0,  x0,  x1, lsl #1
-    st1             {v16.8b}, [x0], x1
-    st1             {v17.8b}, [x0], x1
+        sub             x0,  x0,  x1, lsl #1
+        st1             {v16.8b}, [x0], x1
+        st1             {v17.8b}, [x0], x1
 
 9:
-    ret
+        ret
 endfunc
 
 function ff_h264_h_loop_filter_chroma_mbaff_intra_neon, export=1
-    h264_loop_filter_start_intra
+        h264_loop_filter_start_intra
 
-    sub             x4,  x0,  #2
-    sub             x0,  x0,  #1
-    ld1             {v18.8b}, [x4], x1
-    ld1             {v16.8b}, [x4], x1
-    ld1             {v17.8b}, [x4], x1
-    ld1             {v19.8b}, [x4], x1
+        sub             x4,  x0,  #2
+        sub             x0,  x0,  #1
+        ld1             {v18.8b}, [x4], x1
+        ld1             {v16.8b}, [x4], x1
+        ld1             {v17.8b}, [x4], x1
+        ld1             {v19.8b}, [x4], x1
 
-    transpose_4x8B v18, v16, v17, v19, v26, v27, v28, v29
+        transpose_4x8B v18, v16, v17, v19, v26, v27, v28, v29
 
-    h264_loop_filter_chroma_intra
+        h264_loop_filter_chroma_intra
 
-    st2             {v16.b,v17.b}[0], [x0], x1
-    st2             {v16.b,v17.b}[1], [x0], x1
-    st2             {v16.b,v17.b}[2], [x0], x1
-    st2             {v16.b,v17.b}[3], [x0], x1
+        st2             {v16.b,v17.b}[0], [x0], x1
+        st2             {v16.b,v17.b}[1], [x0], x1
+        st2             {v16.b,v17.b}[2], [x0], x1
+        st2             {v16.b,v17.b}[3], [x0], x1
 
 9:
-    ret
+        ret
 endfunc
 
 function ff_h264_h_loop_filter_chroma_intra_neon, export=1
-    h264_loop_filter_start_intra
+        h264_loop_filter_start_intra
 
-    sub             x4,  x0,  #2
-    sub             x0,  x0,  #1
+        sub             x4,  x0,  #2
+        sub             x0,  x0,  #1
 h_loop_filter_chroma420_intra:
-    ld1             {v18.8b}, [x4], x1
-    ld1             {v16.8b}, [x4], x1
-    ld1             {v17.8b}, [x4], x1
-    ld1             {v19.8b}, [x4], x1
-    ld1             {v18.s}[1], [x4], x1
-    ld1             {v16.s}[1], [x4], x1
-    ld1             {v17.s}[1], [x4], x1
-    ld1             {v19.s}[1], [x4], x1
-
-    transpose_4x8B v18, v16, v17, v19, v26, v27, v28, v29
-
-    h264_loop_filter_chroma_intra
-
-    st2             {v16.b,v17.b}[0], [x0], x1
-    st2             {v16.b,v17.b}[1], [x0], x1
-    st2             {v16.b,v17.b}[2], [x0], x1
-    st2             {v16.b,v17.b}[3], [x0], x1
-    st2             {v16.b,v17.b}[4], [x0], x1
-    st2             {v16.b,v17.b}[5], [x0], x1
-    st2             {v16.b,v17.b}[6], [x0], x1
-    st2             {v16.b,v17.b}[7], [x0], x1
+        ld1             {v18.8b}, [x4], x1
+        ld1             {v16.8b}, [x4], x1
+        ld1             {v17.8b}, [x4], x1
+        ld1             {v19.8b}, [x4], x1
+        ld1             {v18.s}[1], [x4], x1
+        ld1             {v16.s}[1], [x4], x1
+        ld1             {v17.s}[1], [x4], x1
+        ld1             {v19.s}[1], [x4], x1
+
+        transpose_4x8B v18, v16, v17, v19, v26, v27, v28, v29
+
+        h264_loop_filter_chroma_intra
+
+        st2             {v16.b,v17.b}[0], [x0], x1
+        st2             {v16.b,v17.b}[1], [x0], x1
+        st2             {v16.b,v17.b}[2], [x0], x1
+        st2             {v16.b,v17.b}[3], [x0], x1
+        st2             {v16.b,v17.b}[4], [x0], x1
+        st2             {v16.b,v17.b}[5], [x0], x1
+        st2             {v16.b,v17.b}[6], [x0], x1
+        st2             {v16.b,v17.b}[7], [x0], x1
 
 9:
-    ret
+        ret
 endfunc
 
 function ff_h264_h_loop_filter_chroma422_intra_neon, export=1
-    h264_loop_filter_start_intra
-    sub             x4,  x0,  #2
-    add             x5,  x0,  x1, lsl #3
-    sub             x0,  x0,  #1
-    mov             x7,  x30
-    bl              h_loop_filter_chroma420_intra
-    sub             x0,  x5,  #1
-    mov             x30, x7
-    b               h_loop_filter_chroma420_intra
+        h264_loop_filter_start_intra
+        sub             x4,  x0,  #2
+        add             x5,  x0,  x1, lsl #3
+        sub             x0,  x0,  #1
+        mov             x7,  x30
+        bl              h_loop_filter_chroma420_intra
+        sub             x0,  x5,  #1
+        mov             x30, x7
+        b               h_loop_filter_chroma420_intra
 endfunc
 
 .macro  biweight_16     macs, macd
@@ -691,7 +685,6 @@ endfunc
 
 .macro  biweight_func   w
 function ff_biweight_h264_pixels_\w\()_neon, export=1
-        sxtw            x2,  w2
         lsr             w8,  w5,  #31
         add             w7,  w7,  #1
         eor             w8,  w8,  w6,  lsr #30
@@ -800,7 +793,6 @@ endfunc
 
 .macro  weight_func     w
 function ff_weight_h264_pixels_\w\()_neon, export=1
-        sxtw            x1,  w1
         cmp             w3,  #1
         mov             w6,  #1
         lsl             w5,  w5,  w3
@@ -827,3 +819,258 @@ endfunc
         weight_func     16
         weight_func     8
         weight_func     4
+
+.macro  h264_loop_filter_start_10
+        cmp             w2,  #0
+        ldr             w6,  [x4]
+        ccmp            w3,  #0,  #0,  ne
+        lsl             w2,  w2,  #2
+        mov             v24.S[0], w6
+        lsl             w3,  w3,  #2
+        and             w8,  w6,  w6,  lsl #16
+        b.eq            1f
+        ands            w8,  w8,  w8,  lsl #8
+        b.ge            2f
+1:
+        ret
+2:
+.endm
+
+.macro h264_loop_filter_start_intra_10
+        orr             w4,  w2,  w3
+        cbnz            w4,  1f
+        ret
+1:
+        lsl             w2,  w2,  #2
+        lsl             w3,  w3,  #2
+        dup             v30.8h,   w2              // alpha
+        dup             v31.8h,   w3              // beta
+.endm
+
+.macro  h264_loop_filter_chroma_10
+        dup             v22.8h,  w2               // alpha
+        dup             v23.8h,  w3               // beta
+        uxtl            v24.8h,  v24.8b           // tc0
+
+        uabd            v26.8h,  v16.8h,  v0.8h   // abs(p0 - q0)
+        uabd            v28.8h,  v18.8h,  v16.8h  // abs(p1 - p0)
+        uabd            v30.8h,  v2.8h,   v0.8h   // abs(q1 - q0)
+        cmhi            v26.8h,  v22.8h,  v26.8h  // < alpha
+        cmhi            v28.8h,  v23.8h,  v28.8h  // < beta
+        cmhi            v30.8h,  v23.8h,  v30.8h  // < beta
+
+        and             v26.16b, v26.16b, v28.16b
+        mov             v4.16b,  v0.16b
+        sub             v4.8h,   v4.8h,   v16.8h
+        and             v26.16b, v26.16b, v30.16b
+        shl             v4.8h,   v4.8h,   #2
+        mov             x8, v26.d[0]
+        mov             x9, v26.d[1]
+        sli             v24.8h,  v24.8h,  #8
+        uxtl            v24.8h,  v24.8b
+        add             v4.8h,   v4.8h,   v18.8h
+        adds            x8,  x8,  x9
+        shl             v24.8h,  v24.8h,  #2
+
+        b.eq            9f
+
+        movi            v31.8h, #3                // (tc0 - 1) << (BIT_DEPTH - 8)) + 1
+        uqsub           v24.8h,  v24.8h,  v31.8h
+        sub             v4.8h,   v4.8h,   v2.8h
+        srshr           v4.8h,   v4.8h,   #3
+        smin            v4.8h,   v4.8h,   v24.8h
+        neg             v25.8h,  v24.8h
+        smax            v4.8h,   v4.8h,   v25.8h
+        and             v4.16b,  v4.16b,  v26.16b
+        add             v16.8h,  v16.8h,  v4.8h
+        sub             v0.8h,   v0.8h,   v4.8h
+
+        mvni            v4.8h,   #0xFC, lsl #8    // 1023 for clipping
+        movi            v5.8h,   #0
+        smin            v0.8h,   v0.8h,   v4.8h
+        smin            v16.8h,  v16.8h,  v4.8h
+        smax            v0.8h,   v0.8h,   v5.8h
+        smax            v16.8h,  v16.8h,  v5.8h
+.endm
+
+function ff_h264_v_loop_filter_chroma_neon_10, export=1
+        h264_loop_filter_start_10
+
+        mov             x10,  x0
+        sub             x0,  x0,  x1, lsl #1
+        ld1             {v18.8h}, [x0 ], x1
+        ld1             {v0.8h},  [x10], x1
+        ld1             {v16.8h}, [x0 ], x1
+        ld1             {v2.8h},  [x10]
+
+        h264_loop_filter_chroma_10
+
+        sub             x0,  x10,  x1, lsl #1
+        st1             {v16.8h}, [x0], x1
+        st1             {v0.8h},  [x0], x1
+9:
+        ret
+endfunc
+
+function ff_h264_h_loop_filter_chroma_neon_10, export=1
+        h264_loop_filter_start_10
+
+        sub             x0,  x0,  #4 // access the 2nd left pixel
+h_loop_filter_chroma420_10:
+        add             x10,  x0,  x1,  lsl #2
+        ld1             {v18.d}[0], [x0 ], x1
+        ld1             {v18.d}[1], [x10], x1
+        ld1             {v16.d}[0], [x0 ], x1
+        ld1             {v16.d}[1], [x10], x1
+        ld1             {v0.d}[0],  [x0 ], x1
+        ld1             {v0.d}[1],  [x10], x1
+        ld1             {v2.d}[0],  [x0 ], x1
+        ld1             {v2.d}[1],  [x10], x1
+
+        transpose_4x8H  v18, v16, v0, v2, v28, v29, v30, v31
+
+        h264_loop_filter_chroma_10
+
+        transpose_4x8H  v18, v16, v0, v2, v28, v29, v30, v31
+
+        sub             x0,  x10,  x1, lsl #3
+        st1             {v18.d}[0], [x0], x1
+        st1             {v16.d}[0], [x0], x1
+        st1             {v0.d}[0],  [x0], x1
+        st1             {v2.d}[0],  [x0], x1
+        st1             {v18.d}[1], [x0], x1
+        st1             {v16.d}[1], [x0], x1
+        st1             {v0.d}[1],  [x0], x1
+        st1             {v2.d}[1],  [x0], x1
+9:
+        ret
+endfunc
+
+function ff_h264_h_loop_filter_chroma422_neon_10, export=1
+        h264_loop_filter_start_10
+        add             x5,  x0,  x1
+        sub             x0,  x0,  #4
+        add             x1,  x1,  x1
+        mov             x7,  x30
+        bl              h_loop_filter_chroma420_10
+        mov             x30, x7
+        sub             x0,  x5,  #4
+        mov             v24.s[0], w6
+        b               h_loop_filter_chroma420_10
+endfunc
+
+.macro h264_loop_filter_chroma_intra_10
+       uabd            v26.8h,  v16.8h,  v17.8h  // abs(p0 - q0)
+       uabd            v27.8h,  v18.8h,  v16.8h  // abs(p1 - p0)
+       uabd            v28.8h,  v19.8h,  v17.8h  // abs(q1 - q0)
+       cmhi            v26.8h,  v30.8h,  v26.8h  // < alpha
+       cmhi            v27.8h,  v31.8h,  v27.8h  // < beta
+       cmhi            v28.8h,  v31.8h,  v28.8h  // < beta
+       and             v26.16b, v26.16b, v27.16b
+       and             v26.16b, v26.16b, v28.16b
+       mov             x2, v26.d[0]
+       mov             x3, v26.d[1]
+
+       shl             v4.8h,  v18.8h,  #1
+       shl             v6.8h,  v19.8h,  #1
+
+       adds            x2,  x2,  x3
+       b.eq            9f
+
+       add             v20.8h,  v16.8h,  v19.8h
+       add             v22.8h,  v17.8h,  v18.8h
+       add             v20.8h,  v20.8h,  v4.8h
+       add             v22.8h,  v22.8h,  v6.8h
+       urshr           v24.8h,  v20.8h,  #2
+       urshr           v25.8h,  v22.8h,  #2
+       bit             v16.16b, v24.16b, v26.16b
+       bit             v17.16b, v25.16b, v26.16b
+.endm
+
+function ff_h264_v_loop_filter_chroma_intra_neon_10, export=1
+       h264_loop_filter_start_intra_10
+       mov             x9,  x0
+       sub             x0,  x0,  x1, lsl #1
+       ld1             {v18.8h}, [x0], x1
+       ld1             {v17.8h}, [x9], x1
+       ld1             {v16.8h}, [x0], x1
+       ld1             {v19.8h}, [x9]
+
+       h264_loop_filter_chroma_intra_10
+
+       sub             x0,  x9,  x1, lsl #1
+       st1             {v16.8h}, [x0], x1
+       st1             {v17.8h}, [x0], x1
+
+9:
+       ret
+endfunc
+
+function ff_h264_h_loop_filter_chroma_mbaff_intra_neon_10, export=1
+       h264_loop_filter_start_intra_10
+
+       sub             x4,  x0,  #4
+       sub             x0,  x0,  #2
+       add             x9,  x4,  x1, lsl #1
+       ld1             {v18.8h}, [x4], x1
+       ld1             {v17.8h}, [x9], x1
+       ld1             {v16.8h}, [x4], x1
+       ld1             {v19.8h}, [x9], x1
+
+       transpose_4x8H v18, v16, v17, v19, v26, v27, v28, v29
+
+       h264_loop_filter_chroma_intra_10
+
+       st2             {v16.h,v17.h}[0], [x0], x1
+       st2             {v16.h,v17.h}[1], [x0], x1
+       st2             {v16.h,v17.h}[2], [x0], x1
+       st2             {v16.h,v17.h}[3], [x0], x1
+
+9:
+       ret
+endfunc
+
+function ff_h264_h_loop_filter_chroma_intra_neon_10, export=1
+       h264_loop_filter_start_intra_10
+       sub             x4,  x0,  #4
+       sub             x0,  x0,  #2
+h_loop_filter_chroma420_intra_10:
+       add             x9,  x4,  x1, lsl #2
+       ld1             {v18.4h},   [x4], x1
+       ld1             {v18.d}[1], [x9], x1
+       ld1             {v16.4h},   [x4], x1
+       ld1             {v16.d}[1], [x9], x1
+       ld1             {v17.4h},   [x4], x1
+       ld1             {v17.d}[1], [x9], x1
+       ld1             {v19.4h},   [x4], x1
+       ld1             {v19.d}[1], [x9], x1
+
+       transpose_4x8H v18, v16, v17, v19, v26, v27, v28, v29
+
+       h264_loop_filter_chroma_intra_10
+
+       st2             {v16.h,v17.h}[0], [x0], x1
+       st2             {v16.h,v17.h}[1], [x0], x1
+       st2             {v16.h,v17.h}[2], [x0], x1
+       st2             {v16.h,v17.h}[3], [x0], x1
+       st2             {v16.h,v17.h}[4], [x0], x1
+       st2             {v16.h,v17.h}[5], [x0], x1
+       st2             {v16.h,v17.h}[6], [x0], x1
+       st2             {v16.h,v17.h}[7], [x0], x1
+
+9:
+       ret
+endfunc
+
+function ff_h264_h_loop_filter_chroma422_intra_neon_10, export=1
+       h264_loop_filter_start_intra_10
+       sub             x4,  x0,  #4
+       add             x5,  x0,  x1, lsl #3
+       sub             x0,  x0,  #2
+       mov             x7,  x30
+       bl              h_loop_filter_chroma420_intra_10
+       mov             x4,  x9
+       sub             x0,  x5,  #2
+       mov             x30, x7
+       b               h_loop_filter_chroma420_intra_10
+endfunc
index 325a86b..0ae8f70 100644 (file)
@@ -45,10 +45,23 @@ void ff_pred8x8_0lt_dc_neon(uint8_t *src, ptrdiff_t stride);
 void ff_pred8x8_l00_dc_neon(uint8_t *src, ptrdiff_t stride);
 void ff_pred8x8_0l0_dc_neon(uint8_t *src, ptrdiff_t stride);
 
-void ff_pred16x16_top_dc_neon_10(uint8_t *src, ptrdiff_t stride);
-void ff_pred16x16_dc_neon_10(uint8_t *src, ptrdiff_t stride);
-void ff_pred16x16_hor_neon_10(uint8_t *src, ptrdiff_t stride);
 void ff_pred16x16_vert_neon_10(uint8_t *src, ptrdiff_t stride);
+void ff_pred16x16_hor_neon_10(uint8_t *src, ptrdiff_t stride);
+void ff_pred16x16_plane_neon_10(uint8_t *src, ptrdiff_t stride);
+void ff_pred16x16_dc_neon_10(uint8_t *src, ptrdiff_t stride);
+void ff_pred16x16_top_dc_neon_10(uint8_t *src, ptrdiff_t stride);
+
+void ff_pred8x8_vert_neon_10(uint8_t *src, ptrdiff_t stride);
+void ff_pred8x8_hor_neon_10(uint8_t *src, ptrdiff_t stride);
+void ff_pred8x8_plane_neon_10(uint8_t *src, ptrdiff_t stride);
+void ff_pred8x8_dc_neon_10(uint8_t *src, ptrdiff_t stride);
+void ff_pred8x8_128_dc_neon_10(uint8_t *src, ptrdiff_t stride);
+void ff_pred8x8_left_dc_neon_10(uint8_t *src, ptrdiff_t stride);
+void ff_pred8x8_top_dc_neon_10(uint8_t *src, ptrdiff_t stride);
+void ff_pred8x8_l0t_dc_neon_10(uint8_t *src, ptrdiff_t stride);
+void ff_pred8x8_0lt_dc_neon_10(uint8_t *src, ptrdiff_t stride);
+void ff_pred8x8_l00_dc_neon_10(uint8_t *src, ptrdiff_t stride);
+void ff_pred8x8_0l0_dc_neon_10(uint8_t *src, ptrdiff_t stride);
 
 static av_cold void h264_pred_init_neon(H264PredContext *h, int codec_id,
                                         const int bit_depth,
@@ -84,10 +97,31 @@ static av_cold void h264_pred_init_neon(H264PredContext *h, int codec_id,
             h->pred16x16[PLANE_PRED8x8  ] = ff_pred16x16_plane_neon;
     }
     if (bit_depth == 10) {
+        if (chroma_format_idc <= 1) {
+            h->pred8x8[VERT_PRED8x8     ] = ff_pred8x8_vert_neon_10;
+            h->pred8x8[HOR_PRED8x8      ] = ff_pred8x8_hor_neon_10;
+