aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dvdata.h
diff options
context:
space:
mode:
authorRoman Shaposhnik <roman@shaposhnik.org>2008-11-08 00:18:00 +0000
committerRoman Shaposhnik <roman@shaposhnik.org>2008-11-08 00:18:00 +0000
commitc3d470b4a9d04d48d30a91074ffb894d4f0b1438 (patch)
tree787943209178a297887a8b4d16678578c20a4fc7 /libavcodec/dvdata.h
parent939e4e3a72bc367225b99e1b43dedbc0700ec991 (diff)
downloadffmpeg-c3d470b4a9d04d48d30a91074ffb894d4f0b1438.tar.gz
implementing more efficient (and direct) allocation of work for DV codec workers
Originally committed as revision 15788 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dvdata.h')
-rw-r--r--libavcodec/dvdata.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/libavcodec/dvdata.h b/libavcodec/dvdata.h
index e762c412f3..0e4381c109 100644
--- a/libavcodec/dvdata.h
+++ b/libavcodec/dvdata.h
@@ -47,6 +47,7 @@ typedef struct DVprofile {
int height; /* picture height in pixels */
int width; /* picture width in pixels */
AVRational sar[2]; /* sample aspect ratios for 4:3 and 16:9 */
+ void **work_chunks; /* each thread gets its own chunk of frame to work on */
const uint16_t *video_place; /* positions of all DV macroblocks */
enum PixelFormat pix_fmt; /* picture pixel format */
int bpm; /* blocks per macroblock */
@@ -6159,6 +6160,16 @@ static const uint8_t block_sizes_dv100[8] = {
80, 80, 80, 80, 80, 80, 64, 64,
};
+static void *work_chunks_dv25pal [1*12*27];
+static void *work_chunks_dv25pal411[1*12*27];
+static void *work_chunks_dv25ntsc [1*10*27];
+static void *work_chunks_dv50pal [2*12*27];
+static void *work_chunks_dv50ntsc [2*10*27];
+static void *work_chunks_dv100palp [2*12*27];
+static void *work_chunks_dv100ntscp[2*10*27];
+static void *work_chunks_dv100pali [4*12*27];
+static void *work_chunks_dv100ntsci[4*10*27];
+
static const DVprofile dv_profiles[] = {
{ .dsf = 0,
.video_stype = 0x0,
@@ -6171,6 +6182,7 @@ static const DVprofile dv_profiles[] = {
.width = 720,
.sar = {{10, 11}, {40, 33}},
.video_place = dv_place_411,
+ .work_chunks = &work_chunks_dv25ntsc[0],
.pix_fmt = PIX_FMT_YUV411P,
.bpm = 6,
.block_sizes = block_sizes_dv2550,
@@ -6190,6 +6202,7 @@ static const DVprofile dv_profiles[] = {
.width = 720,
.sar = {{59, 54}, {118, 81}},
.video_place = dv_place_420,
+ .work_chunks = &work_chunks_dv25pal[0],
.pix_fmt = PIX_FMT_YUV420P,
.bpm = 6,
.block_sizes = block_sizes_dv2550,
@@ -6209,6 +6222,7 @@ static const DVprofile dv_profiles[] = {
.width = 720,
.sar = {{59, 54}, {118, 81}},
.video_place = dv_place_411P,
+ .work_chunks = &work_chunks_dv25pal411[0],
.pix_fmt = PIX_FMT_YUV411P,
.bpm = 6,
.block_sizes = block_sizes_dv2550,
@@ -6228,6 +6242,7 @@ static const DVprofile dv_profiles[] = {
.width = 720,
.sar = {{10, 11}, {40, 33}},
.video_place = dv_place_422_525,
+ .work_chunks = &work_chunks_dv50ntsc[0],
.pix_fmt = PIX_FMT_YUV422P,
.bpm = 6,
.block_sizes = block_sizes_dv2550,
@@ -6247,6 +6262,7 @@ static const DVprofile dv_profiles[] = {
.width = 720,
.sar = {{59, 54}, {118, 81}},
.video_place = dv_place_422_625,
+ .work_chunks = &work_chunks_dv50pal[0],
.pix_fmt = PIX_FMT_YUV422P,
.bpm = 6,
.block_sizes = block_sizes_dv2550,
@@ -6266,6 +6282,7 @@ static const DVprofile dv_profiles[] = {
.width = 1280,
.sar = {{1, 1}, {1, 1}},
.video_place = dv_place_1080i60,
+ .work_chunks = &work_chunks_dv100ntsci[0],
.pix_fmt = PIX_FMT_YUV422P,
.bpm = 8,
.block_sizes = block_sizes_dv100,
@@ -6285,6 +6302,7 @@ static const DVprofile dv_profiles[] = {
.width = 1440,
.sar = {{1, 1}, {1, 1}},
.video_place = dv_place_1080i50,
+ .work_chunks = &work_chunks_dv100pali[0],
.pix_fmt = PIX_FMT_YUV422P,
.bpm = 8,
.block_sizes = block_sizes_dv100,
@@ -6304,6 +6322,7 @@ static const DVprofile dv_profiles[] = {
.width = 960,
.sar = {{1, 1}, {1, 1}},
.video_place = dv_place_720p60,
+ .work_chunks = &work_chunks_dv100ntscp[0],
.pix_fmt = PIX_FMT_YUV422P,
.bpm = 8,
.block_sizes = block_sizes_dv100,
@@ -6323,6 +6342,7 @@ static const DVprofile dv_profiles[] = {
.width = 960,
.sar = {{1, 1}, {1, 1}},
.video_place = dv_place_720p50,
+ .work_chunks = &work_chunks_dv100palp[0],
.pix_fmt = PIX_FMT_YUV422P,
.bpm = 8,
.block_sizes = block_sizes_dv100,