[FFmpeg-devel] Fwd: [PATCH v2] avcodec/h264: fixed qp table attach for h264

Timothee timothee.informatique at regaud-chapuy.fr
Mon Jun 16 12:14:57 EEST 2025


Hello,

Thank you for the feedback on my first patch. The corruption was likely 
caused by my email client's text formatting.

The patch is attach to prevent any formatting error.

I have check the patch file applies cleanly using `git am` and verified 
that all FATE tests still pass.

Please let me know if this version is correct. Any advice is welcome.

Thanks,
Timothée

On 13/06/2025 à 22:52, Michael Niedermayer wrote :
> On Fri, Jun 13, 2025 at 02:37:53PM +0200, Timothee wrote:
>> Hello,
>>
>> Here is a patch where I fixed the attach of per-macroblock qp tables for
>> H.264. It was implemented for MPEG2 so I have only extended it.
>>
>> I tested the functionality with the codecview filter using the following
>> command: `./ffmpeg -export_side_data 4 -i input.mp4 -vf codecview=qp=1
>> output.mp4`
>>
>> FATE passes.
>>
>> Thanks,
>> Timothée
>>
>> Signed-off-by: Timothee <timothee.informatique at regaud-chapuy.fr>
>> ---
>> libavcodec/h264_slice.c | 16 ++++++++++++----
>> libavfilter/qp_table.c | 3 ++-
>> libavfilter/qp_table.h | 1 +
>> 3 files changed, 15 insertions(+), 5 deletions(-)
>>
>> diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
>> index 7e53e38cca..f217c58837 100644
>> --- a/libavcodec/h264_slice.c
>> +++ b/libavcodec/h264_slice.c
>> @@ -2615,8 +2615,10 @@ static int decode_slice(struct AVCodecContext 
>> *avctx,
>> void *arg)
>> ret = ff_h264_decode_mb_cabac(h, sl);
>> - if (ret >= 0)
>> + if (ret >= 0) {
> Applying: avcodec/h264: fixed qp table attach for h264
> error: corrupt patch at line 20
> error: could not build fake ancestor
>
> [...]
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-avcodec-h264-fixed-qp-table-attach-for-h264.patch
Type: text/x-patch
Size: 3278 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250616/9067f769/attachment.bin>


More information about the ffmpeg-devel mailing list