History

avcodec/ffv1enc: Fix slice coding mode 1 with rgb frames

Michael Niedermayer committed 1 year ago

Commit 99f0f6e1 parent 9899da82 files · +4 −5Browse files

Unified · Split

2 files
  1. libavcodec/ffv1enc.c +3 −3
  2. libavcodec/ffv1enc_template.c +1 −2
libavcodec/ffv1enc.c+3−3
@@ -419,7 +419,7 @@ av_cold int ff_ffv1_write_extradata(AVCodecContext *avctx) · 418 unmodified lines
419 if (f->version == 3) {419 if (f->version == 3) {
420 f->micro_version = 4;420 f->micro_version = 4;
421 } else if (f->version == 4)421 } else if (f->version == 4)
422 f->micro_version = 4;422 f->micro_version = 5;
423 f->combined_version += f->micro_version;423 f->combined_version += f->micro_version;
424 put_symbol(&c, state, f->micro_version, 0);424 put_symbol(&c, state, f->micro_version, 0);
425 }425 }
@@ -1158,9 +1158,9 @@ retry: · 732 unmodified lines
1158 ret = encode_plane(f, sc, p->data[0] + ps*x + y*p->linesize[0], width, height, p->linesize[0], 0, 2, ac);1158 ret = encode_plane(f, sc, p->data[0] + ps*x + y*p->linesize[0], width, height, p->linesize[0], 0, 2, ac);
1159 ret |= encode_plane(f, sc, p->data[0] + 1 + ps*x + y*p->linesize[0], width, height, p->linesize[0], 1, 2, ac);1159 ret |= encode_plane(f, sc, p->data[0] + 1 + ps*x + y*p->linesize[0], width, height, p->linesize[0], 1, 2, ac);
1160 } else if (f->use32bit) {1160 } else if (f->use32bit) {
1161 ret = encode_rgb_frame32(f, sc, planes, width, height, p->linesize);1161 ret = encode_rgb_frame32(f, sc, planes, width, height, p->linesize, ac);
1162 } else {1162 } else {
1163 ret = encode_rgb_frame(f, sc, planes, width, height, p->linesize);1163 ret = encode_rgb_frame(f, sc, planes, width, height, p->linesize, ac);
1164 }1164 }
1165 1165
1166 if (ac != AC_GOLOMB_RICE) {1166 if (ac != AC_GOLOMB_RICE) {
libavcodec/ffv1enc_template.c+1−2
@@ -129,12 +129,11 @@ RENAME(encode_line)(FFV1Context *f, FFV1SliceContext *sc, · 128 unmodified lines
129 129
130static int RENAME(encode_rgb_frame)(FFV1Context *f, FFV1SliceContext *sc,130static int RENAME(encode_rgb_frame)(FFV1Context *f, FFV1SliceContext *sc,
131 const uint8_t *src[4],131 const uint8_t *src[4],
132 int w, int h, const int stride[4])132 int w, int h, const int stride[4], int ac)
133{133{
134 int x, y, p, i;134 int x, y, p, i;
135 const int ring_size = f->context_model ? 3 : 2;135 const int ring_size = f->context_model ? 3 : 2;
136 TYPE *sample[4][3];136 TYPE *sample[4][3];
137 const int ac = f->ac;
138 const int pass1 = !!(f->avctx->flags & AV_CODEC_FLAG_PASS1);137 const int pass1 = !!(f->avctx->flags & AV_CODEC_FLAG_PASS1);
139 int lbd = f->bits_per_raw_sample <= 8;138 int lbd = f->bits_per_raw_sample <= 8;
140 int packed = !src[1];139 int packed = !src[1];

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t