Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-08-17 00:06:02 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2016-08-17 00:06:02 +0300
commit62f5e601aa4d42cf17f5f4331a2b7e2b533d4e69 (patch)
tree98f50ea46a04e8c0f6f6861387b5a139bf5017f8 /libavcodec/ffv1enc_template.c
parenta95fdac4c6203037a4690a4f7960223c8daad73e (diff)
avcodec/ffv1enc: Add RGB48 support
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/ffv1enc_template.c')
-rw-r--r--libavcodec/ffv1enc_template.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/ffv1enc_template.c b/libavcodec/ffv1enc_template.c
index 01aee4935b..b7eea0dd70 100644
--- a/libavcodec/ffv1enc_template.c
+++ b/libavcodec/ffv1enc_template.c
@@ -129,6 +129,7 @@ static int RENAME(encode_rgb_frame)(FFV1Context *s, const uint8_t *src[3],
const int ring_size = s->context_model ? 3 : 2;
TYPE *sample[4][3];
int lbd = s->bits_per_raw_sample <= 8;
+ int packed = !src[1];
int bits = s->bits_per_raw_sample > 0 ? s->bits_per_raw_sample : 8;
int offset = 1 << bits;
@@ -150,6 +151,11 @@ static int RENAME(encode_rgb_frame)(FFV1Context *s, const uint8_t *src[3],
g = (v >> 8) & 0xFF;
r = (v >> 16) & 0xFF;
a = v >> 24;
+ } else if (packed) {
+ const uint16_t *p = ((const uint16_t*)(src[0] + x*6 + stride[0]*y));
+ r = p[0];
+ g = p[1];
+ b = p[2];
} else if (sizeof(TYPE) == 4) {
g = *((const uint16_t *)(src[0] + x*2 + stride[0]*y));
b = *((const uint16_t *)(src[1] + x*2 + stride[1]*y));