[FFmpeg-devel] [PATCH 1/2] avcodec/v210dec: move DSP function setting into dedicated function

James Darnley jdarnley at obe.tv
Wed Mar 6 17:46:20 EET 2019


On 2019-03-06 10:11, Paul B Mahol wrote:
> On 3/6/19, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
>> 2019-03-04 23:58 GMT+01:00, James Darnley <jdarnley at obe.tv>:
>>> Prepare for checkasm test.
>>> ---
>>>  libavcodec/v210dec.c | 13 +++++++++----
>>>  libavcodec/v210dec.h |  1 +
>>>  2 files changed, 10 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c
>>> index ddc5dbe8be..28cf00d320 100644
>>> --- a/libavcodec/v210dec.c
>>> +++ b/libavcodec/v210dec.c
>>> @@ -50,6 +50,14 @@ static void v210_planar_unpack_c(const uint32_t *src,
>>> uint16_t *y, uint16_t *u,
>>>      }
>>>  }
>>>
>>> +av_cold void ff_v210dec_init(V210DecContext *s)
>>> +{
>>> +    s->unpack_frame = v210_planar_unpack_c;
>>
>>> +    s->aligned_input = 0;
>>
>> Isn't this an unrelated change or do I misunderstand?
> 
> You misunderstand.

Maybe.

I need to initialize that member before it is used in the x86 function.
I expect valgrind or similar would catch the use.

It doesn't matter for normal use because it will be set correctly based
on the input data alignment for each frame.  Now that you mention it I
realize I forgot to change that to call the new function so I will send
a v2 later.



More information about the ffmpeg-devel mailing list