API changes, most recent first:
-2016-xx-xx - xxxxxxx - lavu 55.30.0 - frame.h
++2017-xx-xx - xxxxxxx - lavu 55.62.100 / 55.30.0 - frame.h
+ Add AVFrame.crop_left/right/top/bottom fields for attaching cropping
+ information to video frames.
+
-2016-xx-xx - xxxxxxx
- Change av_sha_update() and av_md5_sum()/av_md5_update() length
+2017-xx-xx - xxxxxxxxxx
+ Change av_sha_update(), av_sha512_update() and av_md5_sum()/av_md5_update() length
parameter type to size_t at next major bump.
-2016-xx-xx - xxxxxxx - lavc 57.29.0 - avcodec.h
- Add AV_PKT_DATA_SPHERICAL packet side data to export AVSphericalMapping
- information from containers.
+2017-05-05 - xxxxxxxxxx - lavc 57.94.100 - avcodec.h
+ The cuvid decoders now support AVCodecContext.hw_device_ctx, which removes
+ the requirement to set an incomplete AVCodecContext.hw_frames_ctx only to
+ set the Cuda device handle.
-2016-xx-xx - xxxxxxx - lavu 55.30.0 - spherical.h
- Add AV_FRAME_DATA_SPHERICAL value, av_spherical_alloc() API and
- AVSphericalMapping type to export and describe spherical video properties.
+2017-04-11 - 8378466507 - lavu 55.61.100 - avstring.h
+ Add av_strireplace().
-2016-xx-xx - xxxxxxx - lavf 57.10.0 - avformat.h
- Add av_stream_add_side_data().
+2016-04-06 - 157e57a181 - lavc 57.92.100 - avcodec.h
+ Add AV_PKT_DATA_CONTENT_LIGHT_LEVEL packet side data.
-2016-xx-xx - xxxxxxx - lavu 55.28.0 - pixfmt.h
- Add AV_PIX_FMT_GRAY12(LE/BE).
+2016-04-06 - b378f5bd64 - lavu 55.60.100 - mastering_display_metadata.h
+ Add AV_FRAME_DATA_CONTENT_LIGHT_LEVEL value, av_content_light_metadata_alloc()
+ and av_content_light_metadata_create_side_data() API, and AVContentLightMetadata
+ type to export content light level video properties.
+
+2017-03-31 - 9033e8723c - lavu 55.57.100 - spherical.h
+ Add av_spherical_projection_name().
+ Add av_spherical_from_name().
-2016-xx-xx - xxxxxxx - lavu 55.27.0 - hwcontext.h
+2017-03-30 - 4cda23f1f1 - lavu 55.53.100 / 55.27.0 - hwcontext.h
Add av_hwframe_map() and associated AV_HWFRAME_MAP_* flags.
Add av_hwframe_ctx_create_derived().
return AVERROR(EINVAL);
}
+static int frame_copy_props(AVFrame *dst, const AVFrame *src, int force_copy)
+{
+ int i;
+
+ dst->key_frame = src->key_frame;
+ dst->pict_type = src->pict_type;
+ dst->sample_aspect_ratio = src->sample_aspect_ratio;
++ dst->crop_top = src->crop_top;
++ dst->crop_bottom = src->crop_bottom;
++ dst->crop_left = src->crop_left;
++ dst->crop_right = src->crop_right;
+ dst->pts = src->pts;
+ dst->repeat_pict = src->repeat_pict;
+ dst->interlaced_frame = src->interlaced_frame;
+ dst->top_field_first = src->top_field_first;
+ dst->palette_has_changed = src->palette_has_changed;
+ dst->sample_rate = src->sample_rate;
+ dst->opaque = src->opaque;
+#if FF_API_PKT_PTS
+FF_DISABLE_DEPRECATION_WARNINGS
+ dst->pkt_pts = src->pkt_pts;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
+ dst->pkt_dts = src->pkt_dts;
+ dst->pkt_pos = src->pkt_pos;
+ dst->pkt_size = src->pkt_size;
+ dst->pkt_duration = src->pkt_duration;
+ dst->reordered_opaque = src->reordered_opaque;
+ dst->quality = src->quality;
+ dst->best_effort_timestamp = src->best_effort_timestamp;
+ dst->coded_picture_number = src->coded_picture_number;
+ dst->display_picture_number = src->display_picture_number;
+ dst->flags = src->flags;
+ dst->decode_error_flags = src->decode_error_flags;
+ dst->color_primaries = src->color_primaries;
+ dst->color_trc = src->color_trc;
+ dst->colorspace = src->colorspace;
+ dst->color_range = src->color_range;
+ dst->chroma_location = src->chroma_location;
+
+ av_dict_copy(&dst->metadata, src->metadata, 0);
+
+#if FF_API_ERROR_FRAME
+FF_DISABLE_DEPRECATION_WARNINGS
+ memcpy(dst->error, src->error, sizeof(dst->error));
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
+
+ for (i = 0; i < src->nb_side_data; i++) {
+ const AVFrameSideData *sd_src = src->side_data[i];
+ AVFrameSideData *sd_dst;
+ if ( sd_src->type == AV_FRAME_DATA_PANSCAN
+ && (src->width != dst->width || src->height != dst->height))
+ continue;
+ if (force_copy) {
+ sd_dst = av_frame_new_side_data(dst, sd_src->type,
+ sd_src->size);
+ if (!sd_dst) {
+ wipe_side_data(dst);
+ return AVERROR(ENOMEM);
+ }
+ memcpy(sd_dst->data, sd_src->data, sd_src->size);
+ } else {
+ sd_dst = frame_new_side_data(dst, sd_src->type, av_buffer_ref(sd_src->buf));
+ if (!sd_dst) {
+ wipe_side_data(dst);
+ return AVERROR(ENOMEM);
+ }
+ }
+ av_dict_copy(&sd_dst->metadata, sd_src->metadata, 0);
+ }
+
+#if FF_API_FRAME_QP
+FF_DISABLE_DEPRECATION_WARNINGS
+ dst->qscale_table = NULL;
+ dst->qstride = 0;
+ dst->qscale_type = 0;
+ av_buffer_unref(&dst->qp_table_buf);
+ if (src->qp_table_buf) {
+ dst->qp_table_buf = av_buffer_ref(src->qp_table_buf);
+ if (dst->qp_table_buf) {
+ dst->qscale_table = dst->qp_table_buf->data;
+ dst->qstride = src->qstride;
+ dst->qscale_type = src->qscale_type;
+ }
+ }
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
+
+ av_buffer_unref(&dst->opaque_ref);
+ if (src->opaque_ref) {
+ dst->opaque_ref = av_buffer_ref(src->opaque_ref);
+ if (!dst->opaque_ref)
+ return AVERROR(ENOMEM);
+ }
+
+ return 0;
+}
+
int av_frame_ref(AVFrame *dst, const AVFrame *src)
{
int i, ret = 0;