Unified · Split
| @@ -15,6 +15,10 @@ libavutil: 2012-10-22 · 14 unmodified lines | ||
| 15 | 15 | |
| 16 | 16 | API changes, most recent first: |
| 17 | 17 | |
| 18 | +2014-08-04 - xxxxxxx - lavc 55.72.101 - avcodec.h | |
| 19 | +2014-08-04 - xxxxxxx - lavu 52.95.100 - frame.h | |
| 20 | + Deprecate AVCodecContext.dtg_active_format and use side-data instead | |
| 21 | + | |
| 18 | 22 | 2014-08-03 - xxxxxxx - lavc 55.72.100 - avcodec.h |
| 19 | 23 | Add get_pixels() to AVDCT |
| 20 | 24 | |
| @@ -1690,6 +1690,7 @@ typedef struct AVCodecContext { · 1689 unmodified lines | ||
| 1690 | 1690 | */ |
| 1691 | 1691 | int me_subpel_quality; |
| 1692 | 1692 | |
| 1693 | +#if FF_API_AFD | |
| 1693 | 1694 | /** |
| 1694 | 1695 | * DTG active format information (additional aspect ratio |
| 1695 | 1696 | * information only used in DVB MPEG-2 transport streams) |
| @@ -1697,8 +1698,9 @@ typedef struct AVCodecContext { · 1 unmodified line | ||
| 1697 | 1698 | * |
| 1698 | 1699 | * - encoding: unused |
| 1699 | 1700 | * - decoding: Set by decoder. |
| 1701 | + * @deprecated Deprecated in favour of AVSideData | |
| 1700 | 1702 | */ |
| 1701 | − int dtg_active_format; | |
| 1703 | + attribute_deprecated int dtg_active_format; | |
| 1702 | 1704 | #define FF_DTG_AFD_SAME 8 |
| 1703 | 1705 | #define FF_DTG_AFD_4_3 9 |
| 1704 | 1706 | #define FF_DTG_AFD_16_9 10 |
| @@ -1706,6 +1708,7 @@ typedef struct AVCodecContext { · 1 unmodified line | ||
| 1706 | 1708 | #define FF_DTG_AFD_4_3_SP_14_9 13 |
| 1707 | 1709 | #define FF_DTG_AFD_16_9_SP_14_9 14 |
| 1708 | 1710 | #define FF_DTG_AFD_SP_4_3 15 |
| 1711 | +#endif | |
| 1709 | 1712 | |
| 1710 | 1713 | /** |
| 1711 | 1714 | * maximum motion estimation search range in subpel units |
| @@ -56,6 +56,8 @@ typedef struct Mpeg1Context { · 55 unmodified lines | ||
| 56 | 56 | int has_stereo3d; |
| 57 | 57 | uint8_t *a53_caption; |
| 58 | 58 | int a53_caption_size; |
| 59 | + uint8_t afd; | |
| 60 | + int has_afd; | |
| 59 | 61 | int slice_count; |
| 60 | 62 | int save_aspect_info; |
| 61 | 63 | int save_width, save_height, save_progressive_seq; |
| @@ -1659,6 +1661,18 @@ static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size) · 1597 unmodified lines | ||
| 1659 | 1661 | *stereo = s1->stereo3d; |
| 1660 | 1662 | s1->has_stereo3d = 0; |
| 1661 | 1663 | } |
| 1664 | + | |
| 1665 | + if (s1->has_afd) { | |
| 1666 | + AVFrameSideData *sd = av_frame_new_side_data( | |
| 1667 | + s->current_picture_ptr->f, AV_FRAME_DATA_AFD, | |
| 1668 | + 1); | |
| 1669 | + if (!sd) | |
| 1670 | + return AVERROR(ENOMEM); | |
| 1671 | + | |
| 1672 | + *sd->data = s1->afd; | |
| 1673 | + s1->has_afd = 0; | |
| 1674 | + } | |
| 1675 | + | |
| 1662 | 1676 | if (HAVE_THREADS && (avctx->active_thread_type & FF_THREAD_FRAME)) |
| 1663 | 1677 | ff_thread_finish_setup(avctx); |
| 1664 | 1678 | } else { // second field |
| @@ -2264,6 +2278,7 @@ static void mpeg_decode_user_data(AVCodecContext *avctx, · 599 unmodified lines | ||
| 2264 | 2278 | { |
| 2265 | 2279 | Mpeg1Context *s = avctx->priv_data; |
| 2266 | 2280 | const uint8_t *buf_end = p + buf_size; |
| 2281 | + Mpeg1Context *s1 = avctx->priv_data; | |
| 2267 | 2282 | |
| 2268 | 2283 | if (buf_size > 29){ |
| 2269 | 2284 | int i; |
| @@ -2290,7 +2305,11 @@ static void mpeg_decode_user_data(AVCodecContext *avctx, · 20 unmodified lines | ||
| 2290 | 2305 | if (flags & 0x40) { |
| 2291 | 2306 | if (buf_end - p < 1) |
| 2292 | 2307 | return; |
| 2308 | +#if FF_API_AFD | |
| 2293 | 2309 | avctx->dtg_active_format = p[0] & 0x0f; |
| 2310 | +#endif | |
| 2311 | + s1->has_afd = 1; | |
| 2312 | + s1->afd = p[0] & 0x0f; | |
| 2294 | 2313 | } |
| 2295 | 2314 | } else if (buf_end - p >= 6 && |
| 2296 | 2315 | p[0] == 'J' && p[1] == 'P' && p[2] == '3' && p[3] == 'D' && |
| @@ -2302,7 +2321,6 @@ static void mpeg_decode_user_data(AVCodecContext *avctx, · 5 unmodified lines | ||
| 2302 | 2321 | S3D_video_format_type == 0x04 || |
| 2303 | 2322 | S3D_video_format_type == 0x08 || |
| 2304 | 2323 | S3D_video_format_type == 0x23) { |
| 2305 | − Mpeg1Context *s1 = avctx->priv_data; | |
| 2306 | 2324 | |
| 2307 | 2325 | s1->has_stereo3d = 1; |
| 2308 | 2326 | |
| @@ -30,7 +30,7 @@ · 29 unmodified lines | ||
| 30 | 30 | |
| 31 | 31 | #define LIBAVCODEC_VERSION_MAJOR 55 |
| 32 | 32 | #define LIBAVCODEC_VERSION_MINOR 72 |
| 33 | −#define LIBAVCODEC_VERSION_MICRO 100 | |
| 33 | +#define LIBAVCODEC_VERSION_MICRO 101 | |
| 34 | 34 | |
| 35 | 35 | #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ |
| 36 | 36 | LIBAVCODEC_VERSION_MINOR, \ |
| @@ -168,5 +168,8 @@ · 131 unmodified lines | ||
| 168 | 168 | #ifndef FF_API_CODEC_NAME |
| 169 | 169 | #define FF_API_CODEC_NAME (LIBAVCODEC_VERSION_MAJOR < 57) |
| 170 | 170 | #endif |
| 171 | +#ifndef FF_API_AFD | |
| 172 | +#define FF_API_AFD (LIBAVCODEC_VERSION_MAJOR < 57) | |
| 173 | +#endif | |
| 171 | 174 | |
| 172 | 175 | #endif /* AVCODEC_VERSION_H */ |
| @@ -147,6 +147,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) · 146 unmodified lines | ||
| 147 | 147 | av_log(ctx, AV_LOG_INFO, "displaymatrix: rotation of %.2f degrees", |
| 148 | 148 | av_display_rotation_get((int32_t *)sd->data)); |
| 149 | 149 | break; |
| 150 | + case AV_FRAME_DATA_AFD: | |
| 151 | + av_log(ctx, AV_LOG_INFO, "afd: value of %u", sd->data[0]); | |
| 152 | + break; | |
| 150 | 153 | default: |
| 151 | 154 | av_log(ctx, AV_LOG_WARNING, "unknown side data type %d (%d bytes)", |
| 152 | 155 | sd->type, sd->size); |
| @@ -82,6 +82,22 @@ enum AVFrameSideDataType { · 81 unmodified lines | ||
| 82 | 82 | * See libavutil/display.h for a detailed description of the data. |
| 83 | 83 | */ |
| 84 | 84 | AV_FRAME_DATA_DISPLAYMATRIX, |
| 85 | + /** | |
| 86 | + * Active Format Description data consisting of a single byte as specified in ETSI TS 101 154 | |
| 87 | + * using AVActiveFormatDescription enum | |
| 88 | + */ | |
| 89 | + AV_FRAME_DATA_AFD, | |
| 90 | +}; | |
| 91 | + | |
| 92 | +enum AVActiveFormatDescription | |
| 93 | +{ | |
| 94 | + AV_AFD_SAME = 8, | |
| 95 | + AV_AFD_4_3 = 9, | |
| 96 | + AV_AFD_16_9 = 10, | |
| 97 | + AV_AFD_14_9 = 11, | |
| 98 | + AV_AFD_4_3_SP_14_9 = 13, | |
| 99 | + AV_AFD_16_9_SP_14_9 = 14, | |
| 100 | + AV_AFD_SP_4_3 = 15 | |
| 85 | 101 | }; |
| 86 | 102 | |
| 87 | 103 | typedef struct AVFrameSideData { |
| @@ -56,7 +56,7 @@ · 55 unmodified lines | ||
| 56 | 56 | */ |
| 57 | 57 | |
| 58 | 58 | #define LIBAVUTIL_VERSION_MAJOR 52 |
| 59 | −#define LIBAVUTIL_VERSION_MINOR 94 | |
| 59 | +#define LIBAVUTIL_VERSION_MINOR 95 | |
| 60 | 60 | #define LIBAVUTIL_VERSION_MICRO 100 |
| 61 | 61 | |
| 62 | 62 | #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ |