[FFmpeg-devel] mjpegenc: wrong chrominance sampling values written to SOF header for YUVJ422P?

Andrey Utkin andrey.krieger.utkin at gmail.com
Sun Dec 15 18:39:12 CET 2013


2013/12/14 Michael Niedermayer <michaelni at gmx.at>:
> On Sat, Dec 14, 2013 at 03:43:01PM +0200, Andrey Utkin wrote:
>> Not much related, but i'll just post it here.
>> Seems one more issue in mjpegenc.c
>> line 141:
>>     if(avctx->active_thread_type & FF_THREAD_SLICE){
>>         put_marker(p, DRI);
>>         put_bits(p, 16, 4);  // <===== Section size of 4 bytes is declared
>>         put_bits(p, 16, (avctx->width-1)/(8*hsample[0]) + 1);  //
>> <==== two bytes written
>>         // <===== There should be two more bytes written, AFAIU 0xFFFF
>> hardcode may be used.
>>     }
>
> Why do you think so ?
>
> ITU T.81 says that the size must be 4 and is followed
> by 2 bytes and there is no additional data after that
> (id copy & paste the spec but its in tables that get randmized if i
>  copy and paste them)

Sorry, was wrong. The two-bytes field holding length is counted in
length, so there are 4 bytes in section, it is correct.

-- 
Andrey Utkin


More information about the ffmpeg-devel mailing list