[FFmpeg-devel] [PATCH] Slightly simplify VP8 inter_predict
Jason Garrett-Glaser
jason
Sun Jan 30 21:16:36 CET 2011
On Sun, Jan 30, 2011 at 6:30 AM, Ronald S. Bultje <rsbultje at gmail.com> wrote:
> Hi,
>
> On Sun, Jan 30, 2011 at 2:26 AM, ?<jason at x264.com> wrote:
>> From: Jason Garrett-Glaser <jason at x264.com>
>>
>> Merge an if and a switch.
>> ---
>> ?libavcodec/vp8.c | ? ?7 ++++---
>> ?1 files changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
>> index ef4e270..32d5dd1 100644
>> --- a/libavcodec/vp8.c
>> +++ b/libavcodec/vp8.c
>> @@ -1307,10 +1307,11 @@ void inter_predict(VP8Context *s, uint8_t *dst[3], VP8Macroblock *mb,
>> ? ? AVFrame *ref = s->framep[mb->ref_frame];
>> ? ? VP56mv *bmv = mb->bmv;
>>
>> - ? ?if (mb->mode < VP8_MVMODE_SPLIT) {
>> + ? ?switch (mb->partitioning) {
>> + ? ?case VP8_SPLITMVMODE_NONE:
>> ? ? ? ? vp8_mc_part(s, dst, ref, x_off, y_off,
>> - ? ? ? ? ? ? ? ? ? ?0, 0, 16, 16, width, height, &mb->mv);
>> - ? ?} else switch (mb->partitioning) {
>> + ? ? ? ? ? ? ? ?0, 0, 16, 16, width, height, &mb->mv);
>> + ? ? ? ?break;
>> ? ? case VP8_SPLITMVMODE_4x4: {
>> ? ? ? ? int x, y;
>> ? ? ? ? VP56mv uvmv;
>> --
>> 1.7.3.2.451.g1c2ab.dirty
>
> OK of course.
>
> Ronald
>
Applied.
Jason
More information about the ffmpeg-devel
mailing list