[FFmpeg-devel] [PATCH] rtpenc: Change the warning text about VP8

David Conrad lessen42
Sun Dec 5 07:50:02 CET 2010


On Dec 4, 2010, at 9:16 PM, Jason Garrett-Glaser wrote:

>> but luckily I've been told it doesn't seem to require invoking the arithmetic coder
> 
> Hahahahahahahahahahaha you wish!

Well, all of the arith coding is done with probability 1/2, so you should be able to write an equivalent version with get_bit(s).

>>   ff_vp56_init_range_decoder(c, buf, header_size);
>>   buf      += header_size;
>>   buf_size -= header_size;
>> 
>>   if (s->keyframe) {
>>       if (vp8_rac_get(c))
>>           av_log(s->avctx, AV_LOG_WARNING, "Unspecified colorspace\n");
>>       vp8_rac_get(c); // whether we can skip clamping in dsp functions
>>   }
>> 
>>   if ((s->segmentation.enabled = vp8_rac_get(c)))
>>       parse_segment_info(s);
>>   else
>>       s->segmentation.update_map = 0; // FIXME: move this to some init function?
>> 
>>   s->filter.simple    = vp8_rac_get(c);
>>   s->filter.level     = vp8_rac_get_uint(c, 6);
>>   s->filter.sharpness = vp8_rac_get_uint(c, 3);
>> 
>>   if ((s->lf_delta.enabled = vp8_rac_get(c)))
>>       if (vp8_rac_get(c))
>>           update_lf_deltas(s);
>> 
>>   if (setup_partitions(s, buf, buf_size)) {
>>       av_log(s->avctx, AV_LOG_ERROR, "Invalid partitions\n");
>>       return AVERROR_INVALIDDATA;
>>   }
>> 
>>   get_quants(s);
>> 
>>   if (!s->keyframe) {
>>       update_refs(s);
>>       s->sign_bias[VP56_FRAME_GOLDEN]               = vp8_rac_get(c);
>>       s->sign_bias[VP56_FRAME_GOLDEN2 /* altref */] = vp8_rac_get(c);
>>   }
>> 
>>   // if we aren't saving this frame's probabilities for future frames,
>>   // make a copy of the current probabilities
>>   if (!(s->update_probabilities = vp8_rac_get(c)))
>>       s->prob[1] = s->prob[0];
>> 
> -------------------> s->update_last = s->keyframe || vp8_rac_get(c);
> <-------------------------


That's not the only flag you need to check to determine if the frame is droppable: update_golden, update_altref, and update_probabilities (assuming dropping can include not passing to the codec) need to be checked too.

And it depends on what the RTP spec means as droppable: droppable at the container level without the decoder knowing or droppable after the decoder has parsed the header.



More information about the ffmpeg-devel mailing list