diff mbox

[FFmpeg-devel] vp9: move VP9SharedContext back to the top of VP9Context

Message ID 20170919085158.15304-1-h.leppkes@gmail.com
State Accepted
Commit b4ecf2b582f34ff898017836b7df865e6ad9ce92
Headers show

Commit Message

Hendrik Leppkes Sept. 19, 2017, 8:51 a.m. UTC
VP9SharedContext needs to be the first member so its properties can be
safely accessed from hardware accelerators, without the need to share
the full VP9Context.
---
 libavcodec/vp9dec.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Thompson Sept. 19, 2017, 12:15 p.m. UTC | #1
On 19/09/17 09:51, Hendrik Leppkes wrote:
> VP9SharedContext needs to be the first member so its properties can be
> safely accessed from hardware accelerators, without the need to share
> the full VP9Context.
> ---
>  libavcodec/vp9dec.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/vp9dec.h b/libavcodec/vp9dec.h
> index 96c0e43cd2..66573edc79 100644
> --- a/libavcodec/vp9dec.h
> +++ b/libavcodec/vp9dec.h
> @@ -89,8 +89,8 @@ typedef struct VP9Block {
>  typedef struct VP9TileData VP9TileData;
>  
>  typedef struct VP9Context {
> -    VP9TileData *td;
>      VP9SharedContext s;
> +    VP9TileData *td;
>  
>      VP9DSPContext dsp;
>      VideoDSPContext vdsp;
> 

LGTM.

(You are also fixing #6674 now too.)

- Mark
Ronald S. Bultje Sept. 19, 2017, 12:27 p.m. UTC | #2
Hi,

On Tue, Sep 19, 2017 at 4:51 AM, Hendrik Leppkes <h.leppkes@gmail.com>
wrote:

> VP9SharedContext needs to be the first member so its properties can be
> safely accessed from hardware accelerators, without the need to share
> the full VP9Context.
> ---
>  libavcodec/vp9dec.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/vp9dec.h b/libavcodec/vp9dec.h
> index 96c0e43cd2..66573edc79 100644
> --- a/libavcodec/vp9dec.h
> +++ b/libavcodec/vp9dec.h
> @@ -89,8 +89,8 @@ typedef struct VP9Block {
>  typedef struct VP9TileData VP9TileData;
>
>  typedef struct VP9Context {
> -    VP9TileData *td;
>      VP9SharedContext s;
> +    VP9TileData *td;
>
>      VP9DSPContext dsp;
>      VideoDSPContext vdsp;
> --
> 2.13.2.windows.1


Sorry for not catching that during review.

Is there some way we can make hardware decoding testable in some
fate-configuration so we can automatically catch when this sort of stuff
breaks?

Ronald
Hendrik Leppkes Sept. 19, 2017, 12:46 p.m. UTC | #3
On Tue, Sep 19, 2017 at 2:27 PM, Ronald S. Bultje <rsbultje@gmail.com> wrote:
> Hi,
>
> On Tue, Sep 19, 2017 at 4:51 AM, Hendrik Leppkes <h.leppkes@gmail.com>
> wrote:
>
>> VP9SharedContext needs to be the first member so its properties can be
>> safely accessed from hardware accelerators, without the need to share
>> the full VP9Context.
>> ---
>>  libavcodec/vp9dec.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavcodec/vp9dec.h b/libavcodec/vp9dec.h
>> index 96c0e43cd2..66573edc79 100644
>> --- a/libavcodec/vp9dec.h
>> +++ b/libavcodec/vp9dec.h
>> @@ -89,8 +89,8 @@ typedef struct VP9Block {
>>  typedef struct VP9TileData VP9TileData;
>>
>>  typedef struct VP9Context {
>> -    VP9TileData *td;
>>      VP9SharedContext s;
>> +    VP9TileData *td;
>>
>>      VP9DSPContext dsp;
>>      VideoDSPContext vdsp;
>> --
>> 2.13.2.windows.1
>
>
> Sorry for not catching that during review.
>
> Is there some way we can make hardware decoding testable in some
> fate-configuration so we can automatically catch when this sort of stuff
> breaks?
>

There has been thought about that before, by implementing a "stub"
library of the hw accelerator that just dumps the parameters submitted
for comparison in FATE, but something like that would still be a big
job.

- Hendrik
Hendrik Leppkes Sept. 19, 2017, 12:54 p.m. UTC | #4
On Tue, Sep 19, 2017 at 2:15 PM, Mark Thompson <sw@jkqxz.net> wrote:
> On 19/09/17 09:51, Hendrik Leppkes wrote:
>> VP9SharedContext needs to be the first member so its properties can be
>> safely accessed from hardware accelerators, without the need to share
>> the full VP9Context.
>> ---
>>  libavcodec/vp9dec.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavcodec/vp9dec.h b/libavcodec/vp9dec.h
>> index 96c0e43cd2..66573edc79 100644
>> --- a/libavcodec/vp9dec.h
>> +++ b/libavcodec/vp9dec.h
>> @@ -89,8 +89,8 @@ typedef struct VP9Block {
>>  typedef struct VP9TileData VP9TileData;
>>
>>  typedef struct VP9Context {
>> -    VP9TileData *td;
>>      VP9SharedContext s;
>> +    VP9TileData *td;
>>
>>      VP9DSPContext dsp;
>>      VideoDSPContext vdsp;
>>
>
> LGTM.
>
> (You are also fixing #6674 now too.)
>

Pushed.
diff mbox

Patch

diff --git a/libavcodec/vp9dec.h b/libavcodec/vp9dec.h
index 96c0e43cd2..66573edc79 100644
--- a/libavcodec/vp9dec.h
+++ b/libavcodec/vp9dec.h
@@ -89,8 +89,8 @@  typedef struct VP9Block {
 typedef struct VP9TileData VP9TileData;
 
 typedef struct VP9Context {
-    VP9TileData *td;
     VP9SharedContext s;
+    VP9TileData *td;
 
     VP9DSPContext dsp;
     VideoDSPContext vdsp;