Patch by Rodney Baker, rodney d baker a iinet d net d au Originally committed as revision 24021 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -17,7 +17,7 @@ version <next>: · 16 unmodified lines | ||
| 17 | 17 | - native VP8 decoder |
| 18 | 18 | - RTSP tunneling over HTTP |
| 19 | 19 | - RTP depacketization of SVQ3 |
| 20 | − | |
| 20 | +- -strict inofficial replaced by -strict unofficial | |
| 21 | 21 | |
| 22 | 22 | |
| 23 | 23 | version 0.6: |
| @@ -12,6 +12,9 @@ libavutil: 2009-03-08 · 11 unmodified lines | ||
| 12 | 12 | |
| 13 | 13 | API changes, most recent first: |
| 14 | 14 | |
| 15 | +2010-06-29 - r23885 - lavc 52.79.0 | |
| 16 | + Added FF_COMPLIANCE_UNOFFICIAL and changed all instances of FF_COMPLIANCE_INOFFICIAL to use FF_COMPLIANCE_UNOFFICIAL | |
| 17 | + | |
| 15 | 18 | 2010-06-28 - r23835 - lavfi 1.20.1 - av_parse_color() |
| 16 | 19 | Extend av_parse_color() syntax, make it accept an alpha value specifier and |
| 17 | 20 | set the alpha value to 255 by default. |
| @@ -688,7 +688,7 @@ static void choose_pixel_fmt(AVStream *st, AVCodec *codec) · 687 unmodified lines | ||
| 688 | 688 | } |
| 689 | 689 | if(*p == -1 |
| 690 | 690 | && !( st->codec->codec_id==CODEC_ID_MJPEG |
| 691 | − && st->codec->strict_std_compliance <= FF_COMPLIANCE_INOFFICIAL | |
| 691 | + && st->codec->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL | |
| 692 | 692 | && ( st->codec->pix_fmt == PIX_FMT_YUV420P |
| 693 | 693 | || st->codec->pix_fmt == PIX_FMT_YUV422P))) |
| 694 | 694 | st->codec->pix_fmt = codec->pix_fmts[0]; |
| @@ -30,7 +30,7 @@ · 29 unmodified lines | ||
| 30 | 30 | #include "libavutil/avutil.h" |
| 31 | 31 | |
| 32 | 32 | #define LIBAVCODEC_VERSION_MAJOR 52 |
| 33 | −#define LIBAVCODEC_VERSION_MINOR 78 | |
| 33 | +#define LIBAVCODEC_VERSION_MINOR 79 | |
| 34 | 34 | #define LIBAVCODEC_VERSION_MICRO 1 |
| 35 | 35 | |
| 36 | 36 | #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ |
| @@ -1352,10 +1352,10 @@ typedef struct AVCodecContext { · 1315 unmodified lines | ||
| 1352 | 1352 | * - encoding: Set by user. |
| 1353 | 1353 | * - decoding: Set by user. |
| 1354 | 1354 | * Setting this to STRICT or higher means the encoder and decoder will |
| 1355 | − * generally do stupid things, whereas setting it to inofficial or lower | |
| 1355 | + * generally do stupid things, whereas setting it to unofficial or lower | |
| 1356 | 1356 | * will mean the encoder might produce output that is not supported by all |
| 1357 | 1357 | * spec-compliant decoders. Decoders don't differentiate between normal, |
| 1358 | − * inofficial and experimental (that is, they always try to decode things | |
| 1358 | + * unofficial and experimental (that is, they always try to decode things | |
| 1359 | 1359 | * when they can) unless they are explicitly asked to behave stupidly |
| 1360 | 1360 | * (=strictly conform to the specs) |
| 1361 | 1361 | */ |
| @@ -1363,7 +1363,10 @@ typedef struct AVCodecContext { · 1 unmodified line | ||
| 1363 | 1363 | #define FF_COMPLIANCE_VERY_STRICT 2 ///< Strictly conform to an older more strict version of the spec or reference software. |
| 1364 | 1364 | #define FF_COMPLIANCE_STRICT 1 ///< Strictly conform to all the things in the spec no matter what consequences. |
| 1365 | 1365 | #define FF_COMPLIANCE_NORMAL 0 |
| 1366 | −#define FF_COMPLIANCE_INOFFICIAL -1 ///< Allow inofficial extensions. | |
| 1366 | +#if LIBAVCODEC_VERSION_MAJOR < 53 | |
| 1367 | +#define FF_COMPLIANCE_INOFFICIAL -1 ///< Allow inofficial extensions (deprecated - use FF_COMPLIANCE_UNOFFICIAL instead). | |
| 1368 | +#endif | |
| 1369 | +#define FF_COMPLIANCE_UNOFFICIAL -1 ///< Allow unofficial extensions | |
| 1367 | 1370 | #define FF_COMPLIANCE_EXPERIMENTAL -2 ///< Allow nonstandardized experimental things. |
| 1368 | 1371 | |
| 1369 | 1372 | /** |
| @@ -54,7 +54,7 @@ static av_cold int libgsm_init(AVCodecContext *avctx) { · 53 unmodified lines | ||
| 54 | 54 | if (avctx->sample_rate != 8000) { |
| 55 | 55 | av_log(avctx, AV_LOG_ERROR, "Sample rate 8000Hz required for GSM, got %dHz\n", |
| 56 | 56 | avctx->sample_rate); |
| 57 | − if(avctx->strict_std_compliance > FF_COMPLIANCE_INOFFICIAL) | |
| 57 | + if(avctx->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL) | |
| 58 | 58 | return -1; |
| 59 | 59 | } |
| 60 | 60 | if (avctx->bit_rate != 13000 /* Official */ && |
| @@ -62,7 +62,7 @@ static av_cold int libgsm_init(AVCodecContext *avctx) { · 1 unmodified line | ||
| 62 | 62 | avctx->bit_rate != 0 /* Unknown; a.o. mov does not set bitrate when decoding */ ) { |
| 63 | 63 | av_log(avctx, AV_LOG_ERROR, "Bitrate 13000bps required for GSM, got %dbps\n", |
| 64 | 64 | avctx->bit_rate); |
| 65 | − if(avctx->strict_std_compliance > FF_COMPLIANCE_INOFFICIAL) | |
| 65 | + if(avctx->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL) | |
| 66 | 66 | return -1; |
| 67 | 67 | } |
| 68 | 68 | } |
| @@ -119,7 +119,7 @@ static int find_frame_rate_index(MpegEncContext *s){ · 118 unmodified lines | ||
| 119 | 119 | for(i=1;i<14;i++) { |
| 120 | 120 | int64_t n0= 1001LL/ff_frame_rate_tab[i].den*ff_frame_rate_tab[i].num*s->avctx->time_base.num; |
| 121 | 121 | int64_t n1= 1001LL*s->avctx->time_base.den; |
| 122 | − if(s->avctx->strict_std_compliance > FF_COMPLIANCE_INOFFICIAL && i>=9) break; | |
| 122 | + if(s->avctx->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL && i>=9) break; | |
| 123 | 123 | |
| 124 | 124 | d = FFABS(n0 - n1); |
| 125 | 125 | if(d < dmin){ |
| @@ -254,7 +254,7 @@ av_cold int MPV_encode_init(AVCodecContext *avctx) · 253 unmodified lines | ||
| 254 | 254 | case CODEC_ID_LJPEG: |
| 255 | 255 | case CODEC_ID_MJPEG: |
| 256 | 256 | if(avctx->pix_fmt != PIX_FMT_YUVJ420P && avctx->pix_fmt != PIX_FMT_YUVJ422P && avctx->pix_fmt != PIX_FMT_RGB32 && |
| 257 | − ((avctx->pix_fmt != PIX_FMT_YUV420P && avctx->pix_fmt != PIX_FMT_YUV422P) || avctx->strict_std_compliance>FF_COMPLIANCE_INOFFICIAL)){ | |
| 257 | + ((avctx->pix_fmt != PIX_FMT_YUV420P && avctx->pix_fmt != PIX_FMT_YUV422P) || avctx->strict_std_compliance>FF_COMPLIANCE_UNOFFICIAL)){ | |
| 258 | 258 | av_log(avctx, AV_LOG_ERROR, "colorspace not supported in jpeg\n"); |
| 259 | 259 | return -1; |
| 260 | 260 | } |
| @@ -160,7 +160,10 @@ static const AVOption options[]={ · 159 unmodified lines | ||
| 160 | 160 | {"very", "strictly conform to a older more strict version of the spec or reference software", 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_VERY_STRICT, INT_MIN, INT_MAX, V|D|E, "strict"}, |
| 161 | 161 | {"strict", "strictly conform to all the things in the spec no matter what consequences", 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_STRICT, INT_MIN, INT_MAX, V|D|E, "strict"}, |
| 162 | 162 | {"normal", NULL, 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_NORMAL, INT_MIN, INT_MAX, V|D|E, "strict"}, |
| 163 | −{"inofficial", "allow unofficial extensions", 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_INOFFICIAL, INT_MIN, INT_MAX, V|D|E, "strict"}, | |
| 163 | +#if LIBAVCODEC_VERSION_MAJOR < 53 | |
| 164 | +{"inofficial", "allow unofficial extensions (deprecated - use unofficial)", 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_UNOFFICIAL, INT_MIN, INT_MAX, V|D|E, "strict"}, | |
| 165 | +#endif | |
| 166 | +{"unofficial", "allow unofficial extensions", 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_UNOFFICIAL, INT_MIN, INT_MAX, V|D|E, "strict"}, | |
| 164 | 167 | {"experimental", "allow non standardized experimental things", 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_EXPERIMENTAL, INT_MIN, INT_MAX, V|D|E, "strict"}, |
| 165 | 168 | {"b_qoffset", "qp offset between P and B frames", OFFSET(b_quant_offset), FF_OPT_TYPE_FLOAT, 1.25, -FLT_MAX, FLT_MAX, V|E}, |
| 166 | 169 | {"er", "set error detection aggressivity", OFFSET(error_recognition), FF_OPT_TYPE_INT, FF_ER_CAREFUL, INT_MIN, INT_MAX, A|V|D, "er"}, |