wmv2: Propagate the wmv2 idct permutation type to the dsputils context

Message ID 1358975777-56139-1-git-send-email-martin@martin.st
State Committed
Commit 57ed8debb9b9cc565cc6e9f98c5b5cbb9f69097c
Headers show

Commit Message

Martin Storsjö Jan. 23, 2013, 9:16 p.m.
This fixes encoding where the idct setting originally was set to
FF_IDCT_AUTO and dsputil chose a default idct with a non-null
permutation - even if the permutation tables were updated,
dct_quantize in x86/mpegvideoenc_template.c also checked the
value of this type variable.
---
 libavcodec/wmv2.c |    1 +
 1 file changed, 1 insertion(+)

Comments

Martin Storsjö Jan. 23, 2013, 10:33 p.m. | #1
On Wed, 23 Jan 2013, Martin Storsjö wrote:

> This fixes encoding where the idct setting originally was set to
> FF_IDCT_AUTO and dsputil chose a default idct with a non-null
> permutation - even if the permutation tables were updated,
> dct_quantize in x86/mpegvideoenc_template.c also checked the
> value of this type variable.
> ---
> libavcodec/wmv2.c |    1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/libavcodec/wmv2.c b/libavcodec/wmv2.c
> index dea3b3b..4420f49 100644
> --- a/libavcodec/wmv2.c
> +++ b/libavcodec/wmv2.c
> @@ -29,6 +29,7 @@ av_cold void ff_wmv2_common_init(Wmv2Context * w){
>     MpegEncContext * const s= &w->s;
>
>     ff_wmv2dsp_init(&w->wdsp);
> +    s->dsp.idct_permutation_type = w->wdsp.idct_perm;
>     ff_init_scantable_permutation(s->dsp.idct_permutation,
>                                   w->wdsp.idct_perm);
>     ff_init_scantable(s->dsp.idct_permutation, &w->abt_scantable[0],
> -- 
> 1.7.9.4

OK'd by Ronald on irc.

// Martin

Patch

diff --git a/libavcodec/wmv2.c b/libavcodec/wmv2.c
index dea3b3b..4420f49 100644
--- a/libavcodec/wmv2.c
+++ b/libavcodec/wmv2.c
@@ -29,6 +29,7 @@  av_cold void ff_wmv2_common_init(Wmv2Context * w){
     MpegEncContext * const s= &w->s;
 
     ff_wmv2dsp_init(&w->wdsp);
+    s->dsp.idct_permutation_type = w->wdsp.idct_perm;
     ff_init_scantable_permutation(s->dsp.idct_permutation,
                                   w->wdsp.idct_perm);
     ff_init_scantable(s->dsp.idct_permutation, &w->abt_scantable[0],