mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-27 02:41:54 +08:00
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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user