aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegvideo.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-10-06 13:29:37 +0200
committerAnton Khirnov <anton@khirnov.net>2012-10-12 12:45:39 +0200
commit50ba57e0ce63d9904269ea0728936a0c79f8bfb5 (patch)
tree9afffc3a86a692d3cf454ed883e835af7d0a3a4f /libavcodec/mpegvideo.c
parent9953ff3cd844eb5f6d8dfce98cad94b78a0fc7dc (diff)
downloadffmpeg-50ba57e0ce63d9904269ea0728936a0c79f8bfb5.tar.gz
lavc: do not use av_pix_fmt_descriptors directly.
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 3d14b1fc7a..2470d6d01e 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1527,8 +1527,9 @@ void ff_MPV_frame_end(MpegEncContext *s)
s->current_picture.f.reference &&
!s->intra_only &&
!(s->flags & CODEC_FLAG_EMU_EDGE)) {
- int hshift = av_pix_fmt_descriptors[s->avctx->pix_fmt].log2_chroma_w;
- int vshift = av_pix_fmt_descriptors[s->avctx->pix_fmt].log2_chroma_h;
+ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
+ int hshift = desc->log2_chroma_w;
+ int vshift = desc->log2_chroma_h;
s->dsp.draw_edges(s->current_picture.f.data[0], s->linesize,
s->h_edge_pos, s->v_edge_pos,
EDGE_WIDTH, EDGE_WIDTH,
@@ -2342,9 +2343,10 @@ void ff_draw_horiz_band(MpegEncContext *s, int y, int h){
&& s->current_picture.f.reference
&& !s->intra_only
&& !(s->flags&CODEC_FLAG_EMU_EDGE)) {
+ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
int sides = 0, edge_h;
- int hshift = av_pix_fmt_descriptors[s->avctx->pix_fmt].log2_chroma_w;
- int vshift = av_pix_fmt_descriptors[s->avctx->pix_fmt].log2_chroma_h;
+ int hshift = desc->log2_chroma_w;
+ int vshift = desc->log2_chroma_h;
if (y==0) sides |= EDGE_TOP;
if (y + h >= s->v_edge_pos) sides |= EDGE_BOTTOM;