[FFmpeg-devel] [PATCH] h264: rbsp de-escape and data partitioning..
Benoit Fouet
benoit.fouet
Wed Jun 20 10:54:12 CEST 2007
Andreas ?man wrote:
> Hi
>
> Benoit Fouet wrote:
>
>> Hi Andreas,
>>
>> Andreas ?man wrote:
>>
>>> Index: libavcodec/h264.c
>>> ===================================================================
>>> --- libavcodec/h264.c (revision 9371)
>>> +++ libavcodec/h264.c (working copy)
>>> @@ -1392,6 +1392,7 @@
>>> static uint8_t *decode_nal(H264Context *h, uint8_t *src, int *dst_length, int *consumed, int length){
>>> int i, si, di;
>>> uint8_t *dst;
>>> + int bufidx;
>>>
>>> // src[0]&0x80; //forbidden bit
>>> h->nal_ref_idc= src[0]>>5;
>>> @@ -1420,8 +1421,9 @@
>>> return src;
>>> }
>>>
>>> - h->rbsp_buffer= av_fast_realloc(h->rbsp_buffer, &h->rbsp_buffer_size, length);
>>> - dst= h->rbsp_buffer;
>>> + bufidx = h->nal_unit_type == NAL_DPC ? 1 : 0; // use second escape buffer for inter data
>>>
>>>
>> i think the "? 1 : 0" is not needed
>>
>
> They are not indeed, but i tend to keep such things in for
> clarity
>
>
ok
>> and could you provide a log message, please ?
>> or is "reuse the rbsp de-escape buffer if both the intra and inter -nal
>> units are escaped." ok ?
>>
>
> No, it should be: "Do not reuse the rbsp de-escape buffer if
> both the intra and inter -nal units are escaped"
>
applied with this log message, thanks
Ben
--
Purple Labs S.A.
www.purplelabs.com
More information about the ffmpeg-devel
mailing list