diff options
author | Anton Khirnov <anton@khirnov.net> | 2022-08-23 11:54:41 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2022-09-05 08:09:00 +0200 |
commit | 7203bb6a59c55e853855b2e60e3fbc6d2f65dce1 (patch) | |
tree | f6563ebc1ea5955eab212bda5afd95ec3acfc057 /libavcodec/dv.h | |
parent | 828ec6ef4306d046749817fd6890e11f3289928b (diff) | |
download | ffmpeg-7203bb6a59c55e853855b2e60e3fbc6d2f65dce1.tar.gz |
lavc/dv.h: move encoder/decoder-specific code to a new header
dv.h is also used by libavformat, so avoid exposing encoder/decoder code
to it.
Diffstat (limited to 'libavcodec/dv.h')
-rw-r--r-- | libavcodec/dv.h | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/libavcodec/dv.h b/libavcodec/dv.h index 859a4e6545..535f01cf0b 100644 --- a/libavcodec/dv.h +++ b/libavcodec/dv.h @@ -27,13 +27,6 @@ #ifndef AVCODEC_DV_H #define AVCODEC_DV_H -#include "dv_profile.h" - -typedef struct DVwork_chunk { - uint16_t buf_offset; - uint16_t mb_coordinates[5]; -} DVwork_chunk; - enum dv_section_type { dv_sect_header = 0x1f, dv_sect_subcode = 0x3f, @@ -72,31 +65,4 @@ enum dv_pack_type { */ #define DV_MAX_BPM 8 -int ff_dv_init_dynamic_tables(DVwork_chunk *work_chunks, const AVDVProfile *d); - -static inline int dv_work_pool_size(const AVDVProfile *d) -{ - int size = d->n_difchan * d->difseg_size * 27; - if (DV_PROFILE_IS_1080i50(d)) - size -= 3 * 27; - if (DV_PROFILE_IS_720p50(d)) - size -= 4 * 27; - return size; -} - -static inline void dv_calculate_mb_xy(const AVDVProfile *sys, - const uint8_t *buf, - const DVwork_chunk *work_chunk, - int m, int *mb_x, int *mb_y) -{ - *mb_x = work_chunk->mb_coordinates[m] & 0xff; - *mb_y = work_chunk->mb_coordinates[m] >> 8; - - /* We work with 720p frames split in half. - * The odd half-frame (chan == 2,3) is displaced :-( */ - if (sys->height == 720 && !(buf[1] & 0x0C)) - /* shifting the Y coordinate down by 72/2 macro blocks */ - *mb_y -= (*mb_y > 17) ? 18 : -72; -} - #endif /* AVCODEC_DV_H */ |