Unified · Split
| @@ -13,6 +13,10 @@ libavutil: 2013-12-xx · 12 unmodified lines | |||
| 13 | 13 | ||
| 14 | API changes, most recent first: | 14 | API changes, most recent first: |
| 15 | 15 | ||
| 16 | 2014-04-xx - xxxxxxx - lavc 55.50.3 - avcodec.h | ||
| 17 | Deprecate CODEC_FLAG_MV0. It is replaced by the flag "mv0" in the | ||
| 18 | "mpv_flags" private option of the mpegvideo encoders. | ||
| 19 | |||
| 16 | 2014-04-xx - xxxxxxx - lavc 55.50.2 - avcodec.h | 20 | 2014-04-xx - xxxxxxx - lavc 55.50.2 - avcodec.h |
| 17 | Deprecate CODEC_FLAG_GMC. It is replaced by the "gmc" private option of the | 21 | Deprecate CODEC_FLAG_GMC. It is replaced by the "gmc" private option of the |
| 18 | libxvid encoder. | 22 | libxvid encoder. |
| @@ -675,7 +675,13 @@ typedef struct RcOverride{ · 674 unmodified lines | |||
| 675 | */ | 675 | */ |
| 676 | #define CODEC_FLAG_GMC 0x0020 ///< Use GMC. | 676 | #define CODEC_FLAG_GMC 0x0020 ///< Use GMC. |
| 677 | #endif | 677 | #endif |
| 678 | #define CODEC_FLAG_MV0 0x0040 ///< Always try a MB with MV=<0,0>. | 678 | #if FF_API_MV0 |
| 679 | /** | ||
| 680 | * @deprecated use the flag "mv0" in the "mpv_flags" private option of the | ||
| 681 | * mpegvideo encoders | ||
| 682 | */ | ||
| 683 | #define CODEC_FLAG_MV0 0x0040 | ||
| 684 | #endif | ||
| 679 | #if FF_API_INPUT_PRESERVED | 685 | #if FF_API_INPUT_PRESERVED |
| 680 | /** | 686 | /** |
| 681 | * @deprecated passing reference-counted frames to the encoders replaces this | 687 | * @deprecated passing reference-counted frames to the encoders replaces this |
| @@ -973,7 +973,7 @@ void ff_estimate_p_frame_motion(MpegEncContext * s, · 972 unmodified lines | |||
| 973 | // if (varc*2 + 200*256 + 50*(s->lambda2>>FF_LAMBDA_SHIFT) > vard){ | 973 | // if (varc*2 + 200*256 + 50*(s->lambda2>>FF_LAMBDA_SHIFT) > vard){ |
| 974 | mb_type|= CANDIDATE_MB_TYPE_INTER; | 974 | mb_type|= CANDIDATE_MB_TYPE_INTER; |
| 975 | c->sub_motion_search(s, &mx, &my, dmin, 0, 0, 0, 16); | 975 | c->sub_motion_search(s, &mx, &my, dmin, 0, 0, 0, 16); |
| 976 | if(s->flags&CODEC_FLAG_MV0) | 976 | if (s->mpv_flags & FF_MPV_FLAG_MV0) |
| 977 | if(mx || my) | 977 | if(mx || my) |
| 978 | mb_type |= CANDIDATE_MB_TYPE_SKIPPED; //FIXME check difference | 978 | mb_type |= CANDIDATE_MB_TYPE_SKIPPED; //FIXME check difference |
| 979 | }else{ | 979 | }else{ |
| @@ -1592,7 +1592,8 @@ void ff_estimate_b_frame_motion(MpegEncContext * s, · 612 unmodified lines | |||
| 1592 | } | 1592 | } |
| 1593 | //FIXME something smarter | 1593 | //FIXME something smarter |
| 1594 | if(dmin>256*256*16) type&= ~CANDIDATE_MB_TYPE_DIRECT; //do not try direct mode if it is invalid for this MB | 1594 | if(dmin>256*256*16) type&= ~CANDIDATE_MB_TYPE_DIRECT; //do not try direct mode if it is invalid for this MB |
| 1595 | if(s->codec_id == AV_CODEC_ID_MPEG4 && type&CANDIDATE_MB_TYPE_DIRECT && s->flags&CODEC_FLAG_MV0 && *(uint32_t*)s->b_direct_mv_table[xy]) | 1595 | if (s->codec_id == AV_CODEC_ID_MPEG4 && type&CANDIDATE_MB_TYPE_DIRECT && |
| 1596 | s->mpv_flags & FF_MPV_FLAG_MV0 && *(uint32_t*)s->b_direct_mv_table[xy]) | ||
| 1596 | type |= CANDIDATE_MB_TYPE_DIRECT0; | 1597 | type |= CANDIDATE_MB_TYPE_DIRECT0; |
| 1597 | } | 1598 | } |
| 1598 | 1599 | ||
| @@ -896,7 +896,8 @@ static av_always_inline int epzs_motion_search_internal(MpegEncContext * s, int · 895 unmodified lines | |||
| 896 | score_map[0]= dmin; | 896 | score_map[0]= dmin; |
| 897 | 897 | ||
| 898 | //FIXME precalc first term below? | 898 | //FIXME precalc first term below? |
| 899 | if((s->pict_type == AV_PICTURE_TYPE_B && !(c->flags & FLAG_DIRECT)) || s->flags&CODEC_FLAG_MV0) | 899 | if ((s->pict_type == AV_PICTURE_TYPE_B && !(c->flags & FLAG_DIRECT)) || |
| 900 | s->mpv_flags & FF_MPV_FLAG_MV0) | ||
| 900 | dmin += (mv_penalty[pred_x] + mv_penalty[pred_y])*penalty_factor; | 901 | dmin += (mv_penalty[pred_x] + mv_penalty[pred_y])*penalty_factor; |
| 901 | 902 | ||
| 902 | /* first line */ | 903 | /* first line */ |
| @@ -650,6 +650,7 @@ typedef struct MpegEncContext { · 649 unmodified lines | |||
| 650 | #define FF_MPV_FLAG_QP_RD 0x0004 | 650 | #define FF_MPV_FLAG_QP_RD 0x0004 |
| 651 | #define FF_MPV_FLAG_CBP_RD 0x0008 | 651 | #define FF_MPV_FLAG_CBP_RD 0x0008 |
| 652 | #define FF_MPV_FLAG_NAQ 0x0010 | 652 | #define FF_MPV_FLAG_NAQ 0x0010 |
| 653 | #define FF_MPV_FLAG_MV0 0x0020 | ||
| 653 | 654 | ||
| 654 | #define FF_MPV_OFFSET(x) offsetof(MpegEncContext, x) | 655 | #define FF_MPV_OFFSET(x) offsetof(MpegEncContext, x) |
| 655 | #define FF_MPV_OPT_FLAGS (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM) | 656 | #define FF_MPV_OPT_FLAGS (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM) |
| @@ -660,6 +661,7 @@ typedef struct MpegEncContext { · 4 unmodified lines | |||
| 660 | { "qp_rd", "Use rate distortion optimization for qp selection", 0, AV_OPT_TYPE_CONST, { .i64 = FF_MPV_FLAG_QP_RD }, 0, 0, FF_MPV_OPT_FLAGS, "mpv_flags" },\ | 661 | { "qp_rd", "Use rate distortion optimization for qp selection", 0, AV_OPT_TYPE_CONST, { .i64 = FF_MPV_FLAG_QP_RD }, 0, 0, FF_MPV_OPT_FLAGS, "mpv_flags" },\ |
| 661 | { "cbp_rd", "use rate distortion optimization for CBP", 0, AV_OPT_TYPE_CONST, { .i64 = FF_MPV_FLAG_CBP_RD }, 0, 0, FF_MPV_OPT_FLAGS, "mpv_flags" },\ | 662 | { "cbp_rd", "use rate distortion optimization for CBP", 0, AV_OPT_TYPE_CONST, { .i64 = FF_MPV_FLAG_CBP_RD }, 0, 0, FF_MPV_OPT_FLAGS, "mpv_flags" },\ |
| 662 | { "naq", "normalize adaptive quantization", 0, AV_OPT_TYPE_CONST, { .i64 = FF_MPV_FLAG_NAQ }, 0, 0, FF_MPV_OPT_FLAGS, "mpv_flags" },\ | 663 | { "naq", "normalize adaptive quantization", 0, AV_OPT_TYPE_CONST, { .i64 = FF_MPV_FLAG_NAQ }, 0, 0, FF_MPV_OPT_FLAGS, "mpv_flags" },\ |
| 664 | { "mv0", "always try a mb with mv=<0,0>", 0, AV_OPT_TYPE_CONST, { .i64 = FF_MPV_FLAG_MV0 }, 0, 0, FF_MPV_OPT_FLAGS, "mpv_flags" },\ | ||
| 663 | { "luma_elim_threshold", "single coefficient elimination threshold for luminance (negative values also consider dc coefficient)",\ | 665 | { "luma_elim_threshold", "single coefficient elimination threshold for luminance (negative values also consider dc coefficient)",\ |
| 664 | FF_MPV_OFFSET(luma_elim_threshold), AV_OPT_TYPE_INT, { .i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS },\ | 666 | FF_MPV_OFFSET(luma_elim_threshold), AV_OPT_TYPE_INT, { .i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS },\ |
| 665 | { "chroma_elim_threshold", "single coefficient elimination threshold for chrominance (negative values also consider dc coefficient)",\ | 667 | { "chroma_elim_threshold", "single coefficient elimination threshold for chrominance (negative values also consider dc coefficient)",\ |
| @@ -787,6 +787,13 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) · 786 unmodified lines | |||
| 787 | FF_ENABLE_DEPRECATION_WARNINGS; | 787 | FF_ENABLE_DEPRECATION_WARNINGS; |
| 788 | #endif | 788 | #endif |
| 789 | 789 | ||
| 790 | #if FF_API_MV0 | ||
| 791 | FF_DISABLE_DEPRECATION_WARNINGS | ||
| 792 | if (avctx->flags & CODEC_FLAG_MV0) | ||
| 793 | s->mpv_flags |= FF_MPV_FLAG_MV0; | ||
| 794 | FF_ENABLE_DEPRECATION_WARNINGS | ||
| 795 | #endif | ||
| 796 | |||
| 790 | if (avctx->b_frame_strategy == 2) { | 797 | if (avctx->b_frame_strategy == 2) { |
| 791 | for (i = 0; i < s->max_b_frames + 2; i++) { | 798 | for (i = 0; i < s->max_b_frames + 2; i++) { |
| 792 | s->tmp_frames[i] = av_frame_alloc(); | 799 | s->tmp_frames[i] = av_frame_alloc(); |
| @@ -55,7 +55,9 @@ static const AVOption avcodec_options[] = { · 54 unmodified lines | |||
| 55 | #if FF_API_GMC | 55 | #if FF_API_GMC |
| 56 | {"gmc", "use gmc", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_GMC }, INT_MIN, INT_MAX, V|E, "flags"}, | 56 | {"gmc", "use gmc", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_GMC }, INT_MIN, INT_MAX, V|E, "flags"}, |
| 57 | #endif | 57 | #endif |
| 58 | #if FF_API_MV0 | ||
| 58 | {"mv0", "always try a mb with mv=<0,0>", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_MV0 }, INT_MIN, INT_MAX, V|E, "flags"}, | 59 | {"mv0", "always try a mb with mv=<0,0>", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_MV0 }, INT_MIN, INT_MAX, V|E, "flags"}, |
| 60 | #endif | ||
| 59 | #if FF_API_INPUT_PRESERVED | 61 | #if FF_API_INPUT_PRESERVED |
| 60 | {"input_preserved", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_INPUT_PRESERVED }, INT_MIN, INT_MAX, 0, "flags"}, | 62 | {"input_preserved", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_INPUT_PRESERVED }, INT_MIN, INT_MAX, 0, "flags"}, |
| 61 | #endif | 63 | #endif |
| @@ -30,7 +30,7 @@ · 29 unmodified lines | |||
| 30 | 30 | ||
| 31 | #define LIBAVCODEC_VERSION_MAJOR 55 | 31 | #define LIBAVCODEC_VERSION_MAJOR 55 |
| 32 | #define LIBAVCODEC_VERSION_MINOR 50 | 32 | #define LIBAVCODEC_VERSION_MINOR 50 |
| 33 | #define LIBAVCODEC_VERSION_MICRO 2 | 33 | #define LIBAVCODEC_VERSION_MICRO 3 |
| 34 | 34 | ||
| 35 | #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ | 35 | #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ |
| 36 | LIBAVCODEC_VERSION_MINOR, \ | 36 | LIBAVCODEC_VERSION_MINOR, \ |
| @@ -138,5 +138,8 @@ · 101 unmodified lines | |||
| 138 | #ifndef FF_API_GMC | 138 | #ifndef FF_API_GMC |
| 139 | #define FF_API_GMC (LIBAVCODEC_VERSION_MAJOR < 57) | 139 | #define FF_API_GMC (LIBAVCODEC_VERSION_MAJOR < 57) |
| 140 | #endif | 140 | #endif |
| 141 | #ifndef FF_API_MV0 | ||
| 142 | #define FF_API_MV0 (LIBAVCODEC_VERSION_MAJOR < 57) | ||
| 143 | #endif | ||
| 141 | 144 | ||
| 142 | #endif /* AVCODEC_VERSION_H */ | 145 | #endif /* AVCODEC_VERSION_H */ |