[FFmpeg-devel] [PATCH 1/3] lavc: avcodec_align_dimensions2(): only set 4 linesize aligns.
Paul B Mahol
onemda at gmail.com
Sat Jan 28 21:39:43 CET 2012
On 1/28/12, Michael Niedermayer <michaelni at gmx.at> wrote:
> There are only RGBA or YUVA setting more is likely just inconvenient.
>
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> ---
> libavcodec/utils.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
ffplay needs change too?
> diff --git a/libavcodec/utils.c b/libavcodec/utils.c
> index dec9003..a41c8a5 100644
> --- a/libavcodec/utils.c
> +++ b/libavcodec/utils.c
> @@ -242,7 +242,7 @@ void avcodec_align_dimensions2(AVCodecContext *s, int
> *width, int *height,
> *height+=2; // some of the optimized chroma MC reads one line too
> much
> // which is also done in mpeg decoders with lowres > 0
>
> - for (i = 0; i < AV_NUM_DATA_POINTERS; i++)
> + for (i = 0; i < 4; i++)
> linesize_align[i] = STRIDE_ALIGN;
> //STRIDE_ALIGN is 8 for SSE* but this does not work for SVQ1 chroma planes
> //we could change STRIDE_ALIGN to 16 for x86/sse but it would increase the
> @@ -252,7 +252,7 @@ void avcodec_align_dimensions2(AVCodecContext *s, int
> *width, int *height,
> if(s->codec_id == CODEC_ID_SVQ1 || s->codec_id == CODEC_ID_VP5 ||
> s->codec_id == CODEC_ID_VP6 || s->codec_id == CODEC_ID_VP6F ||
> s->codec_id == CODEC_ID_VP6A || s->codec_id == CODEC_ID_DIRAC) {
> - for (i = 0; i < AV_NUM_DATA_POINTERS; i++)
> + for (i = 0; i < 4; i++)
> linesize_align[i] = 16;
> }
> #endif
> --
> 1.7.5.4
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
More information about the ffmpeg-devel
mailing list