diff options
author | wm4 <wm4@nowhere> | 2019-10-17 22:49:26 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-10-17 22:49:26 +0200 |
commit | 60ab82df322bd91fd1c999dfaa3dd1784617734b (patch) | |
tree | 6d485985218e2728dc09105e2d9aef391cca5a15 /demux | |
parent | c75e0320f60f93f0db40c949320fd9cee27cb52e (diff) | |
download | mpv-60ab82df322bd91fd1c999dfaa3dd1784617734b.tar.bz2 mpv-60ab82df322bd91fd1c999dfaa3dd1784617734b.tar.xz |
video, demux: rip out unused spherical metadata code
This was preparation into something that never happened.
Spherical video is a shit idea anyway.
Diffstat (limited to 'demux')
-rw-r--r-- | demux/demux_lavf.c | 12 | ||||
-rw-r--r-- | demux/demux_mkv.c | 47 | ||||
-rw-r--r-- | demux/stheader.h | 1 |
3 files changed, 0 insertions, 60 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c index 281259a15e..c7eeb0b13e 100644 --- a/demux/demux_lavf.c +++ b/demux/demux_lavf.c @@ -33,7 +33,6 @@ #include <libavutil/avstring.h> #include <libavutil/mathematics.h> #include <libavutil/replaygain.h> -#include <libavutil/spherical.h> #include <libavutil/display.h> #include <libavutil/opt.h> @@ -702,17 +701,6 @@ static void handle_new_stream(demuxer_t *demuxer, int i) sh->codec->rotate = (((int)(-r) % 360) + 360) % 360; } - sd = av_stream_get_side_data(st, AV_PKT_DATA_SPHERICAL, NULL); - if (sd) { - AVSphericalMapping *sp = (void *)sd; - struct mp_spherical_params *mpsp = &sh->codec->spherical; - mpsp->type = sp->projection == AV_SPHERICAL_EQUIRECTANGULAR ? - MP_SPHERICAL_EQUIRECTANGULAR : MP_SPHERICAL_UNKNOWN; - mpsp->ref_angles[0] = sp->yaw / (float)(1 << 16); - mpsp->ref_angles[1] = sp->pitch / (float)(1 << 16); - mpsp->ref_angles[2] = sp->roll / (float)(1 << 16); - } - // This also applies to vfw-muxed mkv, but we can't detect these easily. sh->codec->avi_dts = matches_avinputformat_name(priv, "avi"); diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c index b174d260a6..1398b4bdc8 100644 --- a/demux/demux_mkv.c +++ b/demux/demux_mkv.c @@ -107,7 +107,6 @@ typedef struct mkv_track { uint32_t colorspace; int stereo_mode; struct mp_colorspace color; - struct mp_spherical_params spherical; uint32_t a_channels, a_bps; float a_sfreq; @@ -603,49 +602,6 @@ static void parse_trackcolour(struct demuxer *demuxer, struct mkv_track *track, } } -static void parse_trackprojection(struct demuxer *demuxer, struct mkv_track *track, - struct ebml_projection *projection) -{ - if (projection->n_projection_type) { - const char *name; - switch (projection->projection_type) { - case 0: - name = "rectangular"; - track->spherical.type = MP_SPHERICAL_NONE; - break; - case 1: - name = "equirectangular"; - track->spherical.type = MP_SPHERICAL_EQUIRECTANGULAR; - break; - default: - name = "unknown"; - track->spherical.type = MP_SPHERICAL_UNKNOWN; - } - MP_VERBOSE(demuxer, "| + ProjectionType: %s (%"PRIu64")\n", name, - projection->projection_type); - } - if (projection->n_projection_private) { - MP_VERBOSE(demuxer, "| + ProjectionPrivate: %zd bytes\n", - projection->projection_private.len); - MP_WARN(demuxer, "Unknown ProjectionPrivate element.\n"); - } - if (projection->n_projection_pose_yaw) { - track->spherical.ref_angles[0] = projection->projection_pose_yaw; - MP_VERBOSE(demuxer, "| + ProjectionPoseYaw: %f\n", - projection->projection_pose_yaw); - } - if (projection->n_projection_pose_pitch) { - track->spherical.ref_angles[1] = projection->projection_pose_pitch; - MP_VERBOSE(demuxer, "| + ProjectionPosePitch: %f\n", - projection->projection_pose_pitch); - } - if (projection->n_projection_pose_roll) { - track->spherical.ref_angles[2] = projection->projection_pose_roll; - MP_VERBOSE(demuxer, "| + ProjectionPoseRoll: %f\n", - projection->projection_pose_roll); - } -} - static void parse_trackvideo(struct demuxer *demuxer, struct mkv_track *track, struct ebml_video *video) { @@ -690,8 +646,6 @@ static void parse_trackvideo(struct demuxer *demuxer, struct mkv_track *track, } if (video->n_colour) parse_trackcolour(demuxer, track, &video->colour); - if (video->n_projection) - parse_trackprojection(demuxer, track, &video->projection); } /** @@ -1516,7 +1470,6 @@ static int demux_mkv_open_video(demuxer_t *demuxer, mkv_track_t *track) sh_v->stereo_mode = track->stereo_mode; sh_v->color = track->color; - sh_v->spherical = track->spherical; done: demux_add_sh_stream(demuxer, sh); diff --git a/demux/stheader.h b/demux/stheader.h index 198f16cd49..6be3b16463 100644 --- a/demux/stheader.h +++ b/demux/stheader.h @@ -104,7 +104,6 @@ struct mp_codec_params { int rotate; // intended display rotation, in degrees, [0, 359] int stereo_mode; // mp_stereo3d_mode (0 if none/unknown) struct mp_colorspace color; // colorspace info where available - struct mp_spherical_params spherical; // STREAM_VIDEO + STREAM_AUDIO int bits_per_coded_sample; |