aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegvideo_enc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-01-09 18:33:21 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-01-09 18:33:21 +0000
commitc46eeae2a80dfe0046c15b542e8b9a2c78f19bf7 (patch)
tree8c0378f0ae122dd5fcd3b101f7b55d0d233188f2 /libavcodec/mpegvideo_enc.c
parentaa11ce6568a190b7c843c57bcbc8f5e1785af99b (diff)
downloadffmpeg-c46eeae2a80dfe0046c15b542e8b9a2c78f19bf7.tar.gz
Add a function to match a 2 element vector of uint16_t and use it in h263 and svq1
instead of custom and bloated code to find an index into a w/h array. Originally committed as revision 21113 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo_enc.c')
-rw-r--r--libavcodec/mpegvideo_enc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index e1df08e137..44cf3694cc 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -31,6 +31,7 @@
#include "dsputil.h"
#include "mpegvideo.h"
#include "mpegvideo_common.h"
+#include "h263.h"
#include "mjpegenc.h"
#include "msmpeg4.h"
#include "faandct.h"
@@ -570,7 +571,7 @@ av_cold int MPV_encode_init(AVCodecContext *avctx)
break;
case CODEC_ID_H263:
if (!CONFIG_H263_ENCODER) return -1;
- if (h263_get_picture_format(s->width, s->height) == 7) {
+ if (ff_match_2uint16(h263_format, FF_ARRAY_ELEMS(h263_format), s->width, s->height) == 7) {
av_log(avctx, AV_LOG_INFO, "The specified picture size of %dx%d is not valid for the H.263 codec.\nValid sizes are 128x96, 176x144, 352x288, 704x576, and 1408x1152. Try H.263+.\n", s->width, s->height);
return -1;
}