[FFmpeg-devel] [PATCH 2/2] MxPEG decoder

Anatoly Nenashev anatoly.nenashev
Fri Nov 5 19:50:36 CET 2010


On 05.11.2010 18:29, Michael Niedermayer wrote:
> On Thu, Nov 04, 2010 at 05:43:51PM +0300, Anatoly Nenashev wrote:
>    
>
>> +
>> +        if (mxg->state == 0xffd9) {             /* EOI marker */
>> +            found_frame_end = mxg->current_pos;
>>      
>    
>> +        } else if (mxg->state == 0xffd8) {      /* SOI marker */
>> +            if (mxg->vop_found) {
>> +                /* emulating frame end */
>> +                url_fseek(s->pb, -2, SEEK_CUR);
>> +                mxg->current_pos -= 2;
>> +                found_frame_end = mxg->current_pos;
>> +            } else {
>> +                mxg->vop_found = 1;
>> +            }
>>      
> why is this needed?
> isnt handling of the EOI enough to detect the end?
>    

It was done for more robustness but now i've removed it.


> also where is most time spent?
> if its in the outer loop then the 0xFF startcode search must be split out
> and implemented similar to ff_avc_find_startcode_internal()
> i dont remember if jpeg had size values after the major parts to skip them
> quickly ...
>
>    
Reimplemented. See attachment.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mxg_v11.patch
Type: text/x-patch
Size: 8116 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101105/cb608b79/attachment.bin>



More information about the ffmpeg-devel mailing list