diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-06-29 12:42:43 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-12-01 11:00:41 +0100 |
commit | 01e775f4b790376cacd44685b824c48639afd355 (patch) | |
tree | 90549995513833f83ef77567ebe38f956944127b /libavcodec/h264_slice.c | |
parent | 38d0d12c4641746a28656f09e158d5d0bac1d04d (diff) | |
download | ffmpeg-01e775f4b790376cacd44685b824c48639afd355.tar.gz |
avcodec/h2645_sei: Attach AVStereo3D side data generically
There are only slight differences between H.264 and HEVC
for this side data, so it makes sense to share the code.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/h264_slice.c')
-rw-r--r-- | libavcodec/h264_slice.c | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 9991eaef2c..0ebd77c341 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -31,7 +31,6 @@ #include "libavutil/display.h" #include "libavutil/film_grain_params.h" #include "libavutil/pixdesc.h" -#include "libavutil/stereo3d.h" #include "libavutil/timecode.h" #include "internal.h" #include "cabac.h" @@ -1227,52 +1226,6 @@ static int h264_export_frame_props(H264Context *h) } } - if (h->sei.common.frame_packing.present && - h->sei.common.frame_packing.arrangement_type <= 6 && - h->sei.common.frame_packing.content_interpretation_type > 0 && - h->sei.common.frame_packing.content_interpretation_type < 3) { - H2645SEIFramePacking *fp = &h->sei.common.frame_packing; - AVStereo3D *stereo = av_stereo3d_create_side_data(out); - if (stereo) { - switch (fp->arrangement_type) { - case SEI_FPA_H264_TYPE_CHECKERBOARD: - stereo->type = AV_STEREO3D_CHECKERBOARD; - break; - case SEI_FPA_H264_TYPE_INTERLEAVE_COLUMN: - stereo->type = AV_STEREO3D_COLUMNS; - break; - case SEI_FPA_H264_TYPE_INTERLEAVE_ROW: - stereo->type = AV_STEREO3D_LINES; - break; - case SEI_FPA_TYPE_SIDE_BY_SIDE: - if (fp->quincunx_sampling_flag) - stereo->type = AV_STEREO3D_SIDEBYSIDE_QUINCUNX; - else - stereo->type = AV_STEREO3D_SIDEBYSIDE; - break; - case SEI_FPA_TYPE_TOP_BOTTOM: - stereo->type = AV_STEREO3D_TOPBOTTOM; - break; - case SEI_FPA_TYPE_INTERLEAVE_TEMPORAL: - stereo->type = AV_STEREO3D_FRAMESEQUENCE; - break; - case SEI_FPA_H264_TYPE_2D: - stereo->type = AV_STEREO3D_2D; - break; - } - - if (fp->content_interpretation_type == 2) - stereo->flags = AV_STEREO3D_FLAG_INVERT; - - if (fp->arrangement_type == SEI_FPA_TYPE_INTERLEAVE_TEMPORAL) { - if (fp->current_frame_is_frame0_flag) - stereo->view = AV_STEREO3D_VIEW_LEFT; - else - stereo->view = AV_STEREO3D_VIEW_RIGHT; - } - } - } - if (h->sei.common.afd.present) { AVFrameSideData *sd = av_frame_new_side_data(out, AV_FRAME_DATA_AFD, sizeof(uint8_t)); |