History

avutil: remove deprecated FF_API_PALETTE_HAS_CHANGED

Deprecated since 2023-05-18.

James Almer committed 1 year ago

Commit 6e80ec91 parent 106168947 files · +4 −317Browse files

Unified · Split

47 files
  1. libavcodec/8bps.c +0 −7
  2. libavcodec/ansi.c +0 −10
  3. libavcodec/bethsoftvideo.c +0 −5
  4. libavcodec/bfi.c +0 −10
  5. libavcodec/bintext.c +0 −5
  6. libavcodec/bmvvideo.c +0 −5
  7. libavcodec/brenderpix.c +0 −12
  8. libavcodec/c93.c +0 −5
  9. libavcodec/cdgraphics.c +0 −5
  10. libavcodec/cdtoons.c +0 −5
  11. libavcodec/cinepak.c +0 −7
  12. libavcodec/dds.c +0 −11
  13. libavcodec/dfa.c +0 −5
  14. libavcodec/dsicinvideo.c +0 −5
  15. libavcodec/dxa.c +0 −5
  16. libavcodec/flicvideo.c +0 −5
  17. libavcodec/gemdec.c +0 −5
  18. libavcodec/idcinvideo.c +0 −7
  19. libavcodec/imx.c +0 −10
  20. libavcodec/interplayvideo.c +0 −7
  21. libavcodec/jvdec.c +0 −12
  22. libavcodec/kmvc.c +0 −17
  23. libavcodec/mscc.c +0 −5
  24. libavcodec/msrle.c +0 −8
  25. libavcodec/mss1.c +3 −11
  26. libavcodec/msvideo1.c +0 −7
  27. libavcodec/pafvideo.c +0 −5
  28. libavcodec/pictordec.c +0 −5
  29. libavcodec/psd.c +0 −5
  30. libavcodec/qdrw.c +0 −5
  31. libavcodec/qpeg.c +0 −7
  32. libavcodec/qtrle.c +0 −8
  33. libavcodec/rawdec.c +1 −12
  34. libavcodec/rscc.c +0 −7
  35. libavcodec/sga.c +0 −5
  36. libavcodec/smacker.c +0 −5
  37. libavcodec/smc.c +0 −7
  38. libavcodec/targa.c +0 −5
  39. libavcodec/tiertexseqv.c +0 −5
  40. libavcodec/tmv.c +0 −5
  41. libavcodec/tscc.c +0 −5
  42. libavcodec/vb.c +0 −5
  43. libavcodec/vqavideo.c +0 −5
  44. libavcodec/yop.c +0 −6
  45. libavutil/frame.c +0 −5
  46. libavutil/frame.h +0 −8
  47. libavutil/version.h +0 −1
libavcodec/8bps.c+0−7
@@ -114,14 +114,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 113 unmodified lines
114 }114 }
115 115
116 if (avctx->bits_per_coded_sample <= 8) {116 if (avctx->bits_per_coded_sample <= 8) {
117#if FF_API_PALETTE_HAS_CHANGED
118FF_DISABLE_DEPRECATION_WARNINGS
119 frame->palette_has_changed =
120#endif
121 ff_copy_palette(c->pal, avpkt, avctx);117 ff_copy_palette(c->pal, avpkt, avctx);
122#if FF_API_PALETTE_HAS_CHANGED
123FF_ENABLE_DEPRECATION_WARNINGS
124#endif
125 118
126 memcpy(frame->data[1], c->pal, AVPALETTE_SIZE);119 memcpy(frame->data[1], c->pal, AVPALETTE_SIZE);
127 }120 }
libavcodec/ansi.c+0−10
@@ -262,11 +262,6 @@ static int execute_code(AVCodecContext * avctx, int c) · 261 unmodified lines
262 AV_GET_BUFFER_FLAG_REF)) < 0)262 AV_GET_BUFFER_FLAG_REF)) < 0)
263 return ret;263 return ret;
264 s->frame->pict_type = AV_PICTURE_TYPE_I;264 s->frame->pict_type = AV_PICTURE_TYPE_I;
265#if FF_API_PALETTE_HAS_CHANGED
266FF_DISABLE_DEPRECATION_WARNINGS
267 s->frame->palette_has_changed = 1;
268FF_ENABLE_DEPRECATION_WARNINGS
269#endif
270 set_palette((uint32_t *)s->frame->data[1]);265 set_palette((uint32_t *)s->frame->data[1]);
271 erase_screen(avctx);266 erase_screen(avctx);
272 } else if (c == 'l') {267 } else if (c == 'l') {
@@ -375,11 +370,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, · 102 unmodified lines
375 }370 }
376 371
377 s->frame->pict_type = AV_PICTURE_TYPE_I;372 s->frame->pict_type = AV_PICTURE_TYPE_I;
378#if FF_API_PALETTE_HAS_CHANGED
379FF_DISABLE_DEPRECATION_WARNINGS
380 s->frame->palette_has_changed = 1;
381FF_ENABLE_DEPRECATION_WARNINGS
382#endif
383 set_palette((uint32_t *)s->frame->data[1]);373 set_palette((uint32_t *)s->frame->data[1]);
384 if (!s->first_frame) {374 if (!s->first_frame) {
385 erase_screen(avctx);375 erase_screen(avctx);
libavcodec/bethsoftvideo.c+0−5
@@ -63,11 +63,6 @@ static int set_palette(BethsoftvidContext *ctx, GetByteContext *g) · 62 unmodified lines
63 palette[a] = 0xFFU << 24 | bytestream2_get_be24u(g) * 4;63 palette[a] = 0xFFU << 24 | bytestream2_get_be24u(g) * 4;
64 palette[a] |= palette[a] >> 6 & 0x30303;64 palette[a] |= palette[a] >> 6 & 0x30303;
65 }65 }
66#if FF_API_PALETTE_HAS_CHANGED
67FF_DISABLE_DEPRECATION_WARNINGS
68 ctx->frame->palette_has_changed = 1;
69FF_ENABLE_DEPRECATION_WARNINGS
70#endif
71 return 0;66 return 0;
72}67}
73 68
libavcodec/bfi.c+0−10
@@ -83,19 +83,9 @@ static int bfi_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 82 unmodified lines
83 pal++;83 pal++;
84 }84 }
85 memcpy(bfi->pal, frame->data[1], sizeof(bfi->pal));85 memcpy(bfi->pal, frame->data[1], sizeof(bfi->pal));
86#if FF_API_PALETTE_HAS_CHANGED
87FF_DISABLE_DEPRECATION_WARNINGS
88 frame->palette_has_changed = 1;
89FF_ENABLE_DEPRECATION_WARNINGS
90#endif
91 } else {86 } else {
92 frame->pict_type = AV_PICTURE_TYPE_P;87 frame->pict_type = AV_PICTURE_TYPE_P;
93 frame->flags &= ~AV_FRAME_FLAG_KEY;88 frame->flags &= ~AV_FRAME_FLAG_KEY;
94#if FF_API_PALETTE_HAS_CHANGED
95FF_DISABLE_DEPRECATION_WARNINGS
96 frame->palette_has_changed = 0;
97FF_ENABLE_DEPRECATION_WARNINGS
98#endif
99 memcpy(frame->data[1], bfi->pal, sizeof(bfi->pal));89 memcpy(frame->data[1], bfi->pal, sizeof(bfi->pal));
100 }90 }
101 91
libavcodec/bintext.c+0−5
@@ -157,11 +157,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 156 unmodified lines
157 if ((ret = ff_get_buffer(avctx, s->frame, 0)) < 0)157 if ((ret = ff_get_buffer(avctx, s->frame, 0)) < 0)
158 return ret;158 return ret;
159 s->frame->pict_type = AV_PICTURE_TYPE_I;159 s->frame->pict_type = AV_PICTURE_TYPE_I;
160#if FF_API_PALETTE_HAS_CHANGED
161FF_DISABLE_DEPRECATION_WARNINGS
162 s->frame->palette_has_changed = 1;
163FF_ENABLE_DEPRECATION_WARNINGS
164#endif
165 memcpy(s->frame->data[1], s->palette, 16 * 4);160 memcpy(s->frame->data[1], s->palette, 16 * 4);
166 161
167 if (avctx->codec_id == AV_CODEC_ID_XBIN) {162 if (avctx->codec_id == AV_CODEC_ID_XBIN) {
libavcodec/bmvvideo.c+0−5
@@ -251,11 +251,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 250 unmodified lines
251 }251 }
252 252
253 memcpy(frame->data[1], c->pal, AVPALETTE_SIZE);253 memcpy(frame->data[1], c->pal, AVPALETTE_SIZE);
254#if FF_API_PALETTE_HAS_CHANGED
255FF_DISABLE_DEPRECATION_WARNINGS
256 frame->palette_has_changed = type & BMV_PALETTE;
257FF_ENABLE_DEPRECATION_WARNINGS
258#endif
259 254
260 outptr = frame->data[0];255 outptr = frame->data[0];
261 srcptr = c->frame;256 srcptr = c->frame;
libavcodec/brenderpix.c+0−12
@@ -245,12 +245,6 @@ static int pix_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 244 unmodified lines
245 *pal_out++ = (0xFFU << 24) | bytestream2_get_be32u(&gb);245 *pal_out++ = (0xFFU << 24) | bytestream2_get_be32u(&gb);
246 bytestream2_skip(&gb, 8);246 bytestream2_skip(&gb, 8);
247 247
248#if FF_API_PALETTE_HAS_CHANGED
249FF_DISABLE_DEPRECATION_WARNINGS
250 frame->palette_has_changed = 1;
251FF_ENABLE_DEPRECATION_WARNINGS
252#endif
253
254 chunk_type = bytestream2_get_be32(&gb);248 chunk_type = bytestream2_get_be32(&gb);
255 } else if (avctx->pix_fmt == AV_PIX_FMT_PAL8) {249 } else if (avctx->pix_fmt == AV_PIX_FMT_PAL8) {
256 /* no palette supplied, use the default one */250 /* no palette supplied, use the default one */
@@ -260,12 +254,6 @@ FF_ENABLE_DEPRECATION_WARNINGS · 3 unmodified lines
260 av_log(avctx, AV_LOG_WARNING,254 av_log(avctx, AV_LOG_WARNING,
261 "Using default palette, colors might be off.\n");255 "Using default palette, colors might be off.\n");
262 memcpy(pal_out, std_pal_table, sizeof(uint32_t) * 256);256 memcpy(pal_out, std_pal_table, sizeof(uint32_t) * 256);
263
264#if FF_API_PALETTE_HAS_CHANGED
265FF_DISABLE_DEPRECATION_WARNINGS
266 frame->palette_has_changed = 1;
267FF_ENABLE_DEPRECATION_WARNINGS
268#endif
269 }257 }
270 258
271 data_len = bytestream2_get_be32(&gb);259 data_len = bytestream2_get_be32(&gb);
libavcodec/c93.c+0−5
@@ -246,11 +246,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, · 245 unmodified lines
246 for (i = 0; i < 256; i++) {246 for (i = 0; i < 256; i++) {
247 palette[i] = 0xFFU << 24 | bytestream2_get_be24(&gb);247 palette[i] = 0xFFU << 24 | bytestream2_get_be24(&gb);
248 }248 }
249#if FF_API_PALETTE_HAS_CHANGED
250FF_DISABLE_DEPRECATION_WARNINGS
251 newpic->palette_has_changed = 1;
252FF_ENABLE_DEPRECATION_WARNINGS
253#endif
254 } else {249 } else {
255 if (oldpic->data[1])250 if (oldpic->data[1])
256 memcpy(newpic->data[1], oldpic->data[1], 256 * 4);251 memcpy(newpic->data[1], oldpic->data[1], 256 * 4);
libavcodec/cdgraphics.c+0−5
@@ -125,11 +125,6 @@ static void cdg_load_palette(CDGraphicsContext *cc, uint8_t *data, int low) · 124 unmodified lines
125 b = ((color ) & 0x000F) * 17;125 b = ((color ) & 0x000F) * 17;
126 palette[i + array_offset] = (uint32_t)cc->alpha[i + array_offset] << 24 | r << 16 | g << 8 | b;126 palette[i + array_offset] = (uint32_t)cc->alpha[i + array_offset] << 24 | r << 16 | g << 8 | b;
127 }127 }
128#if FF_API_PALETTE_HAS_CHANGED
129FF_DISABLE_DEPRECATION_WARNINGS
130 cc->frame->palette_has_changed = 1;
131FF_ENABLE_DEPRECATION_WARNINGS
132#endif
133}128}
134 129
135static int cdg_tile_block(CDGraphicsContext *cc, uint8_t *data, int b)130static int cdg_tile_block(CDGraphicsContext *cc, uint8_t *data, int b)
libavcodec/cdtoons.c+0−5
@@ -385,11 +385,6 @@ static int cdtoons_decode_frame(AVCodecContext *avctx, AVFrame *rframe, · 384 unmodified lines
385 }385 }
386 /* first palette entry indicates transparency */386 /* first palette entry indicates transparency */
387 c->pal[0] = 0;387 c->pal[0] = 0;
388#if FF_API_PALETTE_HAS_CHANGED
389FF_DISABLE_DEPRECATION_WARNINGS
390 c->frame->palette_has_changed = 1;
391FF_ENABLE_DEPRECATION_WARNINGS
392#endif
393 }388 }
394 }389 }
395 390
libavcodec/cinepak.c+0−7
@@ -476,14 +476,7 @@ static int cinepak_decode_frame(AVCodecContext *avctx, AVFrame *rframe, · 475 unmodified lines
476 return ret;476 return ret;
477 477
478 if (s->palette_video) {478 if (s->palette_video) {
479#if FF_API_PALETTE_HAS_CHANGED
480FF_DISABLE_DEPRECATION_WARNINGS
481 s->frame->palette_has_changed =
482#endif
483 ff_copy_palette(s->pal, avpkt, avctx);479 ff_copy_palette(s->pal, avpkt, avctx);
484#if FF_API_PALETTE_HAS_CHANGED
485FF_ENABLE_DEPRECATION_WARNINGS
486#endif
487 }480 }
488 481
489 if ((ret = cinepak_decode(s)) < 0) {482 if ((ret = cinepak_decode(s)) < 0) {
libavcodec/dds.c+0−11
@@ -653,11 +653,6 @@ static int dds_decode(AVCodecContext *avctx, AVFrame *frame, · 652 unmodified lines
653 ((unsigned)frame->data[1][3+i*4]<<24)653 ((unsigned)frame->data[1][3+i*4]<<24)
654 );654 );
655 }655 }
656#if FF_API_PALETTE_HAS_CHANGED
657FF_DISABLE_DEPRECATION_WARNINGS
658 frame->palette_has_changed = 1;
659FF_ENABLE_DEPRECATION_WARNINGS
660#endif
661 656
662 if (bytestream2_get_bytes_left(gbc) < frame->height * frame->width / 2) {657 if (bytestream2_get_bytes_left(gbc) < frame->height * frame->width / 2) {
663 av_log(avctx, AV_LOG_ERROR, "Buffer is too small (%d < %d).\n",658 av_log(avctx, AV_LOG_ERROR, "Buffer is too small (%d < %d).\n",
@@ -687,12 +682,6 @@ FF_ENABLE_DEPRECATION_WARNINGS · 23 unmodified lines
687 (frame->data[1][0+i*4]<<16)+682 (frame->data[1][0+i*4]<<16)+
688 ((unsigned)frame->data[1][3+i*4]<<24)683 ((unsigned)frame->data[1][3+i*4]<<24)
689 );684 );
690
691#if FF_API_PALETTE_HAS_CHANGED
692FF_DISABLE_DEPRECATION_WARNINGS
693 frame->palette_has_changed = 1;
694FF_ENABLE_DEPRECATION_WARNINGS
695#endif
696 }685 }
697 686
698 if (bytestream2_get_bytes_left(gbc) < frame->height * linesize) {687 if (bytestream2_get_bytes_left(gbc) < frame->height * linesize) {
libavcodec/dfa.c+0−5
@@ -367,11 +367,6 @@ static int dfa_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 366 unmodified lines
367 s->pal[i] = bytestream2_get_be24(&gb) << 2;367 s->pal[i] = bytestream2_get_be24(&gb) << 2;
368 s->pal[i] |= 0xFFU << 24 | (s->pal[i] >> 6) & 0x30303;368 s->pal[i] |= 0xFFU << 24 | (s->pal[i] >> 6) & 0x30303;
369 }369 }
370#if FF_API_PALETTE_HAS_CHANGED
371FF_DISABLE_DEPRECATION_WARNINGS
372 frame->palette_has_changed = 1;
373FF_ENABLE_DEPRECATION_WARNINGS
374#endif
375 } else if (chunk_type <= 9) {370 } else if (chunk_type <= 9) {
376 if (decoder[chunk_type - 2](&gb, s->frame_buf, avctx->width, avctx->height)) {371 if (decoder[chunk_type - 2](&gb, s->frame_buf, avctx->width, avctx->height)) {
377 av_log(avctx, AV_LOG_ERROR, "Error decoding %s chunk\n",372 av_log(avctx, AV_LOG_ERROR, "Error decoding %s chunk\n",
libavcodec/dsicinvideo.c+0−5
@@ -294,11 +294,6 @@ static int cinvideo_decode_frame(AVCodecContext *avctx, AVFrame *rframe, · 293 unmodified lines
294 return res;294 return res;
295 295
296 memcpy(cin->frame->data[1], cin->palette, sizeof(cin->palette));296 memcpy(cin->frame->data[1], cin->palette, sizeof(cin->palette));
297#if FF_API_PALETTE_HAS_CHANGED
298FF_DISABLE_DEPRECATION_WARNINGS
299 cin->frame->palette_has_changed = 1;
300FF_ENABLE_DEPRECATION_WARNINGS
301#endif
302 for (y = 0; y < cin->avctx->height; ++y)297 for (y = 0; y < cin->avctx->height; ++y)
303 memcpy(cin->frame->data[0] + (cin->avctx->height - 1 - y) * cin->frame->linesize[0],298 memcpy(cin->frame->data[0] + (cin->avctx->height - 1 - y) * cin->frame->linesize[0],
304 cin->bitmap_table[CIN_CUR_BMP] + y * cin->avctx->width,299 cin->bitmap_table[CIN_CUR_BMP] + y * cin->avctx->width,
libavcodec/dxa.c+0−5
@@ -230,11 +230,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 229 unmodified lines
230 if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0)230 if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0)
231 return ret;231 return ret;
232 memcpy(frame->data[1], c->pal, AVPALETTE_SIZE);232 memcpy(frame->data[1], c->pal, AVPALETTE_SIZE);
233#if FF_API_PALETTE_HAS_CHANGED
234FF_DISABLE_DEPRECATION_WARNINGS
235 frame->palette_has_changed = pc;
236FF_ENABLE_DEPRECATION_WARNINGS
237#endif
238 233
239 outptr = frame->data[0];234 outptr = frame->data[0];
240 srcptr = c->decomp_buf;235 srcptr = c->decomp_buf;
libavcodec/flicvideo.c+0−5
@@ -682,11 +682,6 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx, · 681 unmodified lines
682 /* make the palette available on the way out */682 /* make the palette available on the way out */
683 memcpy(s->frame->data[1], s->palette, AVPALETTE_SIZE);683 memcpy(s->frame->data[1], s->palette, AVPALETTE_SIZE);
684 if (s->new_palette) {684 if (s->new_palette) {
685#if FF_API_PALETTE_HAS_CHANGED
686FF_DISABLE_DEPRECATION_WARNINGS
687 s->frame->palette_has_changed = 1;
688FF_ENABLE_DEPRECATION_WARNINGS
689#endif
690 s->new_palette = 0;685 s->new_palette = 0;
691 }686 }
692 687
libavcodec/gemdec.c+0−5
@@ -182,11 +182,6 @@ static int gem_decode_frame(AVCodecContext *avctx, AVFrame *p, · 181 unmodified lines
182 182
183 p->pict_type = AV_PICTURE_TYPE_I;183 p->pict_type = AV_PICTURE_TYPE_I;
184 p->flags |= AV_FRAME_FLAG_KEY;184 p->flags |= AV_FRAME_FLAG_KEY;
185#if FF_API_PALETTE_HAS_CHANGED
186FF_DISABLE_DEPRECATION_WARNINGS
187 p->palette_has_changed = 1;
188FF_ENABLE_DEPRECATION_WARNINGS
189#endif
190 palette = (uint32_t *)p->data[1];185 palette = (uint32_t *)p->data[1];
191 186
192 if (tag == AV_RB32("STTT")) {187 if (tag == AV_RB32("STTT")) {
libavcodec/idcinvideo.c+0−7
@@ -224,14 +224,7 @@ static int idcin_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 223 unmodified lines
224 if (idcin_decode_vlcs(s, frame))224 if (idcin_decode_vlcs(s, frame))
225 return AVERROR_INVALIDDATA;225 return AVERROR_INVALIDDATA;
226 226
227#if FF_API_PALETTE_HAS_CHANGED
228FF_DISABLE_DEPRECATION_WARNINGS
229 frame->palette_has_changed =
230#endif
231 ff_copy_palette(s->pal, avpkt, avctx);227 ff_copy_palette(s->pal, avpkt, avctx);
232#if FF_API_PALETTE_HAS_CHANGED
233FF_ENABLE_DEPRECATION_WARNINGS
234#endif
235 /* make the palette available on the way out */228 /* make the palette available on the way out */
236 memcpy(frame->data[1], s->pal, AVPALETTE_SIZE);229 memcpy(frame->data[1], s->pal, AVPALETTE_SIZE);
237 230
libavcodec/imx.c+0−10
@@ -58,19 +58,9 @@ static int imx_decode_frame(AVCodecContext *avctx, AVFrame *rframe, · 57 unmodified lines
58 return ret;58 return ret;
59 59
60 if (ff_copy_palette(imx->pal, avpkt, avctx)) {60 if (ff_copy_palette(imx->pal, avpkt, avctx)) {
61#if FF_API_PALETTE_HAS_CHANGED
62FF_DISABLE_DEPRECATION_WARNINGS
63 frame->palette_has_changed = 1;
64FF_ENABLE_DEPRECATION_WARNINGS
65#endif
66 frame->flags |= AV_FRAME_FLAG_KEY;61 frame->flags |= AV_FRAME_FLAG_KEY;
67 } else {62 } else {
68 frame->flags &= ~AV_FRAME_FLAG_KEY;63 frame->flags &= ~AV_FRAME_FLAG_KEY;
69#if FF_API_PALETTE_HAS_CHANGED
70FF_DISABLE_DEPRECATION_WARNINGS
71 frame->palette_has_changed = 0;
72FF_ENABLE_DEPRECATION_WARNINGS
73#endif
74 }64 }
75 65
76 bytestream2_init(&gb, avpkt->data, avpkt->size);66 bytestream2_init(&gb, avpkt->data, avpkt->size);
libavcodec/interplayvideo.c+0−7
@@ -1315,14 +1315,7 @@ static int ipvideo_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 1314 unmodified lines
1315 return ret;1315 return ret;
1316 1316
1317 if (!s->is_16bpp) {1317 if (!s->is_16bpp) {
1318#if FF_API_PALETTE_HAS_CHANGED
1319FF_DISABLE_DEPRECATION_WARNINGS
1320 frame->palette_has_changed =
1321#endif
1322 ff_copy_palette(s->pal, avpkt, avctx);1318 ff_copy_palette(s->pal, avpkt, avctx);
1323#if FF_API_PALETTE_HAS_CHANGED
1324FF_ENABLE_DEPRECATION_WARNINGS
1325#endif
1326 }1319 }
1327 1320
1328 switch (frame_format) {1321 switch (frame_format) {
libavcodec/jvdec.c+0−12
@@ -37,9 +37,6 @@ typedef struct JvContext { · 36 unmodified lines
37 BlockDSPContext bdsp;37 BlockDSPContext bdsp;
38 AVFrame *frame;38 AVFrame *frame;
39 uint32_t palette[AVPALETTE_COUNT];39 uint32_t palette[AVPALETTE_COUNT];
40#if FF_API_PALETTE_HAS_CHANGED
41 int palette_has_changed;
42#endif
43} JvContext;40} JvContext;
44 41
45static av_cold int decode_init(AVCodecContext *avctx)42static av_cold int decode_init(AVCodecContext *avctx)
@@ -209,18 +206,9 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, · 163 unmodified lines
209 s->palette[i] = 0xFFU << 24 | pal << 2 | ((pal >> 4) & 0x30303);206 s->palette[i] = 0xFFU << 24 | pal << 2 | ((pal >> 4) & 0x30303);
210 buf += 3;207 buf += 3;
211 }208 }
212#if FF_API_PALETTE_HAS_CHANGED
213 s->palette_has_changed = 1;
214#endif
215 }209 }
216 210
217 if (video_size) {211 if (video_size) {
218#if FF_API_PALETTE_HAS_CHANGED
219FF_DISABLE_DEPRECATION_WARNINGS
220 s->frame->palette_has_changed = s->palette_has_changed;
221 s->palette_has_changed = 0;
222FF_ENABLE_DEPRECATION_WARNINGS
223#endif
224 memcpy(s->frame->data[1], s->palette, AVPALETTE_SIZE);212 memcpy(s->frame->data[1], s->palette, AVPALETTE_SIZE);
225 213
226 if ((ret = av_frame_ref(rframe, s->frame)) < 0)214 if ((ret = av_frame_ref(rframe, s->frame)) < 0)
libavcodec/kmvc.c+0−17
@@ -273,14 +273,7 @@ static int decode_frame(AVCodecContext * avctx, AVFrame *frame, · 272 unmodified lines
273 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)273 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
274 return ret;274 return ret;
275 275
276#if FF_API_PALETTE_HAS_CHANGED
277FF_DISABLE_DEPRECATION_WARNINGS
278 frame->palette_has_changed =
279#endif
280 ff_copy_palette(ctx->pal, avpkt, avctx);276 ff_copy_palette(ctx->pal, avpkt, avctx);
281#if FF_API_PALETTE_HAS_CHANGED
282FF_ENABLE_DEPRECATION_WARNINGS
283#endif
284 277
285 header = bytestream2_get_byte(&ctx->g);278 header = bytestream2_get_byte(&ctx->g);
286 279
@@ -303,11 +296,6 @@ FF_ENABLE_DEPRECATION_WARNINGS · 16 unmodified lines
303 }296 }
304 297
305 if (header & KMVC_PALETTE) {298 if (header & KMVC_PALETTE) {
306#if FF_API_PALETTE_HAS_CHANGED
307FF_DISABLE_DEPRECATION_WARNINGS
308 frame->palette_has_changed = 1;
309FF_ENABLE_DEPRECATION_WARNINGS
310#endif
311 // palette starts from index 1 and has 127 entries299 // palette starts from index 1 and has 127 entries
312 for (i = 1; i <= ctx->palsize; i++) {300 for (i = 1; i <= ctx->palsize; i++) {
313 ctx->pal[i] = 0xFFU << 24 | bytestream2_get_be24(&ctx->g);301 ctx->pal[i] = 0xFFU << 24 | bytestream2_get_be24(&ctx->g);
@@ -316,11 +304,6 @@ FF_ENABLE_DEPRECATION_WARNINGS · 2 unmodified lines
316 304
317 if (ctx->setpal) {305 if (ctx->setpal) {
318 ctx->setpal = 0;306 ctx->setpal = 0;
319#if FF_API_PALETTE_HAS_CHANGED
320FF_DISABLE_DEPRECATION_WARNINGS
321 frame->palette_has_changed = 1;
322FF_ENABLE_DEPRECATION_WARNINGS
323#endif
324 }307 }
325 308
326 /* make the palette available on the way out */309 /* make the palette available on the way out */
libavcodec/mscc.c+0−5
@@ -184,11 +184,6 @@ inflate_error: · 183 unmodified lines
184 const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, &size);184 const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, &size);
185 185
186 if (pal && size == AVPALETTE_SIZE) {186 if (pal && size == AVPALETTE_SIZE) {
187#if FF_API_PALETTE_HAS_CHANGED
188FF_DISABLE_DEPRECATION_WARNINGS
189 frame->palette_has_changed = 1;
190FF_ENABLE_DEPRECATION_WARNINGS
191#endif
192 for (j = 0; j < 256; j++)187 for (j = 0; j < 256; j++)
193 s->pal[j] = 0xFF000000 | AV_RL32(pal + j * 4);188 s->pal[j] = 0xFF000000 | AV_RL32(pal + j * 4);
194 } else if (pal) {189 } else if (pal) {
libavcodec/msrle.c+0−8
@@ -95,15 +95,7 @@ static int msrle_decode_frame(AVCodecContext *avctx, AVFrame *rframe, · 94 unmodified lines
95 return ret;95 return ret;
96 96
97 if (avctx->bits_per_coded_sample > 1 && avctx->bits_per_coded_sample <= 8) {97 if (avctx->bits_per_coded_sample > 1 && avctx->bits_per_coded_sample <= 8) {
98#if FF_API_PALETTE_HAS_CHANGED
99FF_DISABLE_DEPRECATION_WARNINGS
100 s->frame->palette_has_changed =
101#endif
102 ff_copy_palette(s->pal, avpkt, avctx);98 ff_copy_palette(s->pal, avpkt, avctx);
103#if FF_API_PALETTE_HAS_CHANGED
104FF_ENABLE_DEPRECATION_WARNINGS
105#endif
106
107 /* make the palette available */99 /* make the palette available */
108 memcpy(s->frame->data[1], s->pal, AVPALETTE_SIZE);100 memcpy(s->frame->data[1], s->pal, AVPALETTE_SIZE);
109 }101 }
libavcodec/mss1.c+3−11
@@ -121,13 +121,13 @@ static void arith_init(ArithCoder *c, GetBitContext *gb) · 120 unmodified lines
121 c->get_number = arith_get_number;121 c->get_number = arith_get_number;
122}122}
123 123
124static int decode_pal(MSS12Context *ctx, ArithCoder *acoder)124static void decode_pal(MSS12Context *ctx, ArithCoder *acoder)
125{125{
126 int i, ncol, r, g, b;126 int i, ncol, r, g, b;
127 uint32_t *pal = ctx->pal + 256 - ctx->free_colours;127 uint32_t *pal = ctx->pal + 256 - ctx->free_colours;
128 128
129 if (!ctx->free_colours)129 if (!ctx->free_colours)
130 return 0;130 return;
131 131
132 ncol = arith_get_number(acoder, ctx->free_colours + 1);132 ncol = arith_get_number(acoder, ctx->free_colours + 1);
133 for (i = 0; i < ncol; i++) {133 for (i = 0; i < ncol; i++) {
@@ -136,8 +136,6 @@ static int decode_pal(MSS12Context *ctx, ArithCoder *acoder) · 2 unmodified lines
136 b = arith_get_bits(acoder, 8);136 b = arith_get_bits(acoder, 8);
137 *pal++ = (0xFFU << 24) | (r << 16) | (g << 8) | b;137 *pal++ = (0xFFU << 24) | (r << 16) | (g << 8) | b;
138 }138 }
139
140 return !!ncol;
141}139}
142 140
143static int mss1_decode_frame(AVCodecContext *avctx, AVFrame *rframe,141static int mss1_decode_frame(AVCodecContext *avctx, AVFrame *rframe,
@@ -147,7 +145,6 @@ static int mss1_decode_frame(AVCodecContext *avctx, AVFrame *rframe, · 3 unmodified lines
147 MSS12Context *c = &ctx->ctx;145 MSS12Context *c = &ctx->ctx;
148 GetBitContext gb;146 GetBitContext gb;
149 ArithCoder acoder;147 ArithCoder acoder;
150 int pal_changed = 0;
151 int ret;148 int ret;
152 149
153 if ((ret = init_get_bits8(&gb, avpkt->data, avpkt->size)) < 0)150 if ((ret = init_get_bits8(&gb, avpkt->data, avpkt->size)) < 0)
@@ -164,7 +161,7 @@ static int mss1_decode_frame(AVCodecContext *avctx, AVFrame *rframe, · 10 unmodified lines
164 if (c->keyframe) {161 if (c->keyframe) {
165 c->corrupted = 0;162 c->corrupted = 0;
166 ff_mss12_slicecontext_reset(&ctx->sc);163 ff_mss12_slicecontext_reset(&ctx->sc);
167 pal_changed = decode_pal(c, &acoder);164 decode_pal(c, &acoder);
168 ctx->pic->flags |= AV_FRAME_FLAG_KEY;165 ctx->pic->flags |= AV_FRAME_FLAG_KEY;
169 ctx->pic->pict_type = AV_PICTURE_TYPE_I;166 ctx->pic->pict_type = AV_PICTURE_TYPE_I;
170 } else {167 } else {
@@ -178,11 +175,6 @@ static int mss1_decode_frame(AVCodecContext *avctx, AVFrame *rframe, · 7 unmodified lines
178 if (c->corrupted)175 if (c->corrupted)
179 return AVERROR_INVALIDDATA;176 return AVERROR_INVALIDDATA;
180 memcpy(ctx->pic->data[1], c->pal, AVPALETTE_SIZE);177 memcpy(ctx->pic->data[1], c->pal, AVPALETTE_SIZE);
181#if FF_API_PALETTE_HAS_CHANGED
182FF_DISABLE_DEPRECATION_WARNINGS
183 ctx->pic->palette_has_changed = pal_changed;
184FF_ENABLE_DEPRECATION_WARNINGS
185#endif
186 178
187 if ((ret = av_frame_ref(rframe, ctx->pic)) < 0)179 if ((ret = av_frame_ref(rframe, ctx->pic)) < 0)
188 return ret;180 return ret;
libavcodec/msvideo1.c+0−7
@@ -312,14 +312,7 @@ static int msvideo1_decode_frame(AVCodecContext *avctx, AVFrame *rframe, · 311 unmodified lines
312 return ret;312 return ret;
313 313
314 if (s->mode_8bit) {314 if (s->mode_8bit) {
315#if FF_API_PALETTE_HAS_CHANGED
316FF_DISABLE_DEPRECATION_WARNINGS
317 s->frame->palette_has_changed =
318#endif
319 ff_copy_palette(s->pal, avpkt, avctx);315 ff_copy_palette(s->pal, avpkt, avctx);
320#if FF_API_PALETTE_HAS_CHANGED
321FF_ENABLE_DEPRECATION_WARNINGS
322#endif
323 }316 }
324 317
325 if (s->mode_8bit)318 if (s->mode_8bit)
libavcodec/pafvideo.c+0−5
@@ -328,11 +328,6 @@ static int paf_video_decode(AVCodecContext *avctx, AVFrame *rframe, · 327 unmodified lines
328 b = b << 2 | b >> 4;328 b = b << 2 | b >> 4;
329 *out++ = (0xFFU << 24) | (r << 16) | (g << 8) | b;329 *out++ = (0xFFU << 24) | (r << 16) | (g << 8) | b;
330 }330 }
331#if FF_API_PALETTE_HAS_CHANGED
332FF_DISABLE_DEPRECATION_WARNINGS
333 c->pic->palette_has_changed = 1;
334FF_ENABLE_DEPRECATION_WARNINGS
335#endif
336 }331 }
337 332
338 c->dirty[c->current_frame] = 1;333 c->dirty[c->current_frame] = 1;
libavcodec/pictordec.c+0−5
@@ -192,11 +192,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 191 unmodified lines
192 return ret;192 return ret;
193 memset(frame->data[0], 0, s->height * frame->linesize[0]);193 memset(frame->data[0], 0, s->height * frame->linesize[0]);
194 frame->pict_type = AV_PICTURE_TYPE_I;194 frame->pict_type = AV_PICTURE_TYPE_I;
195#if FF_API_PALETTE_HAS_CHANGED
196FF_DISABLE_DEPRECATION_WARNINGS
197 frame->palette_has_changed = 1;
198FF_ENABLE_DEPRECATION_WARNINGS
199#endif
200 195
201 pos_after_pal = bytestream2_tell(&s->g) + esize;196 pos_after_pal = bytestream2_tell(&s->g) + esize;
202 palette = (uint32_t*)frame->data[1];197 palette = (uint32_t*)frame->data[1];
libavcodec/psd.c+0−5
@@ -533,11 +533,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture, · 532 unmodified lines
533 }533 }
534 534
535 if (s->color_mode == PSD_INDEXED) {535 if (s->color_mode == PSD_INDEXED) {
536#if FF_API_PALETTE_HAS_CHANGED
537FF_DISABLE_DEPRECATION_WARNINGS
538 picture->palette_has_changed = 1;
539FF_ENABLE_DEPRECATION_WARNINGS
540#endif
541 memcpy(picture->data[1], s->palette, AVPALETTE_SIZE);536 memcpy(picture->data[1], s->palette, AVPALETTE_SIZE);
542 }537 }
543 538
libavcodec/qdrw.c+0−5
@@ -384,11 +384,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 383 unmodified lines
384 ret = parse_palette(avctx, &gbc, (uint32_t *)p->data[1], colors, flags & 0x8000);384 ret = parse_palette(avctx, &gbc, (uint32_t *)p->data[1], colors, flags & 0x8000);
385 if (ret < 0)385 if (ret < 0)
386 return ret;386 return ret;
387#if FF_API_PALETTE_HAS_CHANGED
388FF_DISABLE_DEPRECATION_WARNINGS
389 p->palette_has_changed = 1;
390FF_ENABLE_DEPRECATION_WARNINGS
391#endif
392 387
393 /* jump to image data */388 /* jump to image data */
394 bytestream2_skip(&gbc, 18);389 bytestream2_skip(&gbc, 18);
libavcodec/qpeg.c+0−7
@@ -297,14 +297,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 296 unmodified lines
297 }297 }
298 298
299 /* make the palette available on the way out */299 /* make the palette available on the way out */
300#if FF_API_PALETTE_HAS_CHANGED
301FF_DISABLE_DEPRECATION_WARNINGS
302 p->palette_has_changed =
303#endif
304 ff_copy_palette(a->pal, avpkt, avctx);300 ff_copy_palette(a->pal, avpkt, avctx);
305#if FF_API_PALETTE_HAS_CHANGED
306FF_ENABLE_DEPRECATION_WARNINGS
307#endif
308 memcpy(p->data[1], a->pal, AVPALETTE_SIZE);301 memcpy(p->data[1], a->pal, AVPALETTE_SIZE);
309 302
310 if ((ret = av_frame_replace(ref, p)) < 0)303 if ((ret = av_frame_replace(ref, p)) < 0)
libavcodec/qtrle.c+0−8
@@ -537,15 +537,7 @@ static int qtrle_decode_frame(AVCodecContext *avctx, AVFrame *rframe, · 536 unmodified lines
537 }537 }
538 538
539 if(has_palette) {539 if(has_palette) {
540#if FF_API_PALETTE_HAS_CHANGED
541FF_DISABLE_DEPRECATION_WARNINGS
542 s->frame->palette_has_changed =
543#endif
544 ff_copy_palette(s->pal, avpkt, avctx);540 ff_copy_palette(s->pal, avpkt, avctx);
545#if FF_API_PALETTE_HAS_CHANGED
546FF_ENABLE_DEPRECATION_WARNINGS
547#endif
548
549 /* make the palette available on the way out */541 /* make the palette available on the way out */
550 memcpy(s->frame->data[1], s->pal, AVPALETTE_SIZE);542 memcpy(s->frame->data[1], s->pal, AVPALETTE_SIZE);
551 }543 }
libavcodec/rawdec.c+1−12
@@ -368,24 +368,13 @@ static int raw_decode(AVCodecContext *avctx, AVFrame *frame, · 367 unmodified lines
368 return ret;368 return ret;
369 }369 }
370 370
371 if (ff_copy_palette(context->palette->data, avpkt, avctx)) {371 if (!ff_copy_palette(context->palette->data, avpkt, avctx) && context->is_nut_pal8) {
372#if FF_API_PALETTE_HAS_CHANGED
373FF_DISABLE_DEPRECATION_WARNINGS
374 frame->palette_has_changed = 1;
375FF_ENABLE_DEPRECATION_WARNINGS
376#endif
377 } else if (context->is_nut_pal8) {
378 int vid_size = avctx->width * avctx->height;372 int vid_size = avctx->width * avctx->height;
379 int pal_size = avpkt->size - vid_size;373 int pal_size = avpkt->size - vid_size;
380 374
381 if (avpkt->size > vid_size && pal_size <= AVPALETTE_SIZE) {375 if (avpkt->size > vid_size && pal_size <= AVPALETTE_SIZE) {
382 const uint8_t *pal = avpkt->data + vid_size;376 const uint8_t *pal = avpkt->data + vid_size;
383 memcpy(context->palette->data, pal, pal_size);377 memcpy(context->palette->data, pal, pal_size);
384#if FF_API_PALETTE_HAS_CHANGED
385FF_DISABLE_DEPRECATION_WARNINGS
386 frame->palette_has_changed = 1;
387FF_ENABLE_DEPRECATION_WARNINGS
388#endif
389 }378 }
390 }379 }
391 }380 }
libavcodec/rscc.c+0−7
@@ -347,14 +347,7 @@ static int rscc_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 346 unmodified lines
347 347
348 /* Palette handling */348 /* Palette handling */
349 if (avctx->pix_fmt == AV_PIX_FMT_PAL8) {349 if (avctx->pix_fmt == AV_PIX_FMT_PAL8) {
350#if FF_API_PALETTE_HAS_CHANGED
351FF_DISABLE_DEPRECATION_WARNINGS
352 frame->palette_has_changed =
353#endif
354 ff_copy_palette(ctx->palette, avpkt, avctx);350 ff_copy_palette(ctx->palette, avpkt, avctx);
355#if FF_API_PALETTE_HAS_CHANGED
356FF_ENABLE_DEPRECATION_WARNINGS
357#endif
358 memcpy(frame->data[1], ctx->palette, AVPALETTE_SIZE);351 memcpy(frame->data[1], ctx->palette, AVPALETTE_SIZE);
359 }352 }
360 // We only return a picture when enough of it is undamaged, this avoids copying nearly broken frames around353 // We only return a picture when enough of it is undamaged, this avoids copying nearly broken frames around
libavcodec/sga.c+0−5
@@ -501,11 +501,6 @@ static int sga_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 500 unmodified lines
501 }501 }
502 502
503 memcpy(frame->data[1], s->pal, AVPALETTE_SIZE);503 memcpy(frame->data[1], s->pal, AVPALETTE_SIZE);
504#if FF_API_PALETTE_HAS_CHANGED
505FF_DISABLE_DEPRECATION_WARNINGS
506 frame->palette_has_changed = 1;
507FF_ENABLE_DEPRECATION_WARNINGS
508#endif
509 frame->pict_type = AV_PICTURE_TYPE_I;504 frame->pict_type = AV_PICTURE_TYPE_I;
510 frame->flags |= AV_FRAME_FLAG_KEY;505 frame->flags |= AV_FRAME_FLAG_KEY;
511 506
libavcodec/smacker.c+0−5
@@ -393,11 +393,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, · 392 unmodified lines
393 pal = (uint32_t*)smk->pic->data[1];393 pal = (uint32_t*)smk->pic->data[1];
394 bytestream2_init(&gb2, avpkt->data, avpkt->size);394 bytestream2_init(&gb2, avpkt->data, avpkt->size);
395 flags = bytestream2_get_byteu(&gb2);395 flags = bytestream2_get_byteu(&gb2);
396#if FF_API_PALETTE_HAS_CHANGED
397FF_DISABLE_DEPRECATION_WARNINGS
398 smk->pic->palette_has_changed = flags & 1;
399FF_ENABLE_DEPRECATION_WARNINGS
400#endif
401 if (flags & 2) {396 if (flags & 2) {
402 smk->pic->flags |= AV_FRAME_FLAG_KEY;397 smk->pic->flags |= AV_FRAME_FLAG_KEY;
403 smk->pic->pict_type = AV_PICTURE_TYPE_I;398 smk->pic->pict_type = AV_PICTURE_TYPE_I;
libavcodec/smc.c+0−7
@@ -437,14 +437,7 @@ static int smc_decode_frame(AVCodecContext *avctx, AVFrame *rframe, · 436 unmodified lines
437 if ((ret = ff_reget_buffer(avctx, s->frame, 0)) < 0)437 if ((ret = ff_reget_buffer(avctx, s->frame, 0)) < 0)
438 return ret;438 return ret;
439 439
440#if FF_API_PALETTE_HAS_CHANGED
441FF_DISABLE_DEPRECATION_WARNINGS
442 s->frame->palette_has_changed =
443#endif
444 ff_copy_palette(s->pal, avpkt, avctx);440 ff_copy_palette(s->pal, avpkt, avctx);
445#if FF_API_PALETTE_HAS_CHANGED
446FF_ENABLE_DEPRECATION_WARNINGS
447#endif
448 441
449 bytestream2_init(&gb, buf, buf_size);442 bytestream2_init(&gb, buf, buf_size);
450 ret = smc_decode_stream(s, &gb);443 ret = smc_decode_stream(s, &gb);
libavcodec/targa.c+0−5
@@ -249,11 +249,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 248 unmodified lines
249 }249 }
250 break;250 break;
251 }251 }
252#if FF_API_PALETTE_HAS_CHANGED
253FF_DISABLE_DEPRECATION_WARNINGS
254 p->palette_has_changed = 1;
255FF_ENABLE_DEPRECATION_WARNINGS
256#endif
257 }252 }
258 }253 }
259 254
libavcodec/tiertexseqv.c+0−5
@@ -182,11 +182,6 @@ static int seqvideo_decode(SeqVideoContext *seq, const unsigned char *data, int · 181 unmodified lines
182 c[j] = (*data << 2) | (*data >> 4);182 c[j] = (*data << 2) | (*data >> 4);
183 palette[i] = 0xFFU << 24 | AV_RB24(c);183 palette[i] = 0xFFU << 24 | AV_RB24(c);
184 }184 }
185#if FF_API_PALETTE_HAS_CHANGED
186FF_DISABLE_DEPRECATION_WARNINGS
187 seq->frame->palette_has_changed = 1;
188FF_ENABLE_DEPRECATION_WARNINGS
189#endif
190 }185 }
191 186
192 if (flags & 2) {187 if (flags & 2) {
libavcodec/tmv.c+0−5
@@ -58,11 +58,6 @@ static int tmv_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 57 unmodified lines
58 58
59 dst = frame->data[0];59 dst = frame->data[0];
60 60
61#if FF_API_PALETTE_HAS_CHANGED
62FF_DISABLE_DEPRECATION_WARNINGS
63 frame->palette_has_changed = 1;
64FF_ENABLE_DEPRECATION_WARNINGS
65#endif
66 memcpy(frame->data[1], ff_cga_palette, 16 * 4);61 memcpy(frame->data[1], ff_cga_palette, 16 * 4);
67 memset(frame->data[1] + 16 * 4, 0, AVPALETTE_SIZE - 16 * 4);62 memset(frame->data[1] + 16 * 4, 0, AVPALETTE_SIZE - 16 * 4);
68 63
libavcodec/tscc.c+0−5
@@ -107,11 +107,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, · 106 unmodified lines
107 107
108 /* make the palette available on the way out */108 /* make the palette available on the way out */
109 if (c->avctx->pix_fmt == AV_PIX_FMT_PAL8) {109 if (c->avctx->pix_fmt == AV_PIX_FMT_PAL8) {
110#if FF_API_PALETTE_HAS_CHANGED
111FF_DISABLE_DEPRECATION_WARNINGS
112 frame->palette_has_changed = palette_has_changed;
113FF_ENABLE_DEPRECATION_WARNINGS
114#endif
115 memcpy(frame->data[1], c->pal, AVPALETTE_SIZE);110 memcpy(frame->data[1], c->pal, AVPALETTE_SIZE);
116 }111 }
117 112
libavcodec/vb.c+0−5
@@ -231,11 +231,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 230 unmodified lines
231 }231 }
232 232
233 memcpy(frame->data[1], c->pal, AVPALETTE_SIZE);233 memcpy(frame->data[1], c->pal, AVPALETTE_SIZE);
234#if FF_API_PALETTE_HAS_CHANGED
235FF_DISABLE_DEPRECATION_WARNINGS
236 frame->palette_has_changed = flags & VB_HAS_PALETTE;
237FF_ENABLE_DEPRECATION_WARNINGS
238#endif
239 234
240 outptr = frame->data[0];235 outptr = frame->data[0];
241 srcptr = c->frame;236 srcptr = c->frame;
libavcodec/vqavideo.c+0−5
@@ -810,11 +810,6 @@ static int vqa_decode_frame(AVCodecContext *avctx, AVFrame *rframe, · 809 unmodified lines
810 810
811 /* make the palette available on the way out */811 /* make the palette available on the way out */
812 memcpy(s->frame->data[1], s->palette, PALETTE_COUNT * 4);812 memcpy(s->frame->data[1], s->palette, PALETTE_COUNT * 4);
813#if FF_API_PALETTE_HAS_CHANGED
814FF_DISABLE_DEPRECATION_WARNINGS
815 s->frame->palette_has_changed = 1;
816FF_ENABLE_DEPRECATION_WARNINGS
817#endif
818 } else if (avctx->pix_fmt == AV_PIX_FMT_RGB555LE) {813 } else if (avctx->pix_fmt == AV_PIX_FMT_RGB555LE) {
819 if ((res = vqa_decode_frame_hicolor(s, s->frame)) < 0)814 if ((res = vqa_decode_frame_hicolor(s, s->frame)) < 0)
820 return res;815 return res;
libavcodec/yop.c+0−6
@@ -232,12 +232,6 @@ static int yop_decode_frame(AVCodecContext *avctx, AVFrame *rframe, · 231 unmodified lines
232 (palette[i + firstcolor] >> 6) & 0x30303;232 (palette[i + firstcolor] >> 6) & 0x30303;
233 }233 }
234 234
235#if FF_API_PALETTE_HAS_CHANGED
236FF_DISABLE_DEPRECATION_WARNINGS
237 frame->palette_has_changed = 1;
238FF_ENABLE_DEPRECATION_WARNINGS
239#endif
240
241 for (y = 0; y < avctx->height; y += 2) {235 for (y = 0; y < avctx->height; y += 2) {
242 for (x = 0; x < avctx->width; x += 2) {236 for (x = 0; x < avctx->width; x += 2) {
243 if (s->srcptr - avpkt->data >= avpkt->size) {237 if (s->srcptr - avpkt->data >= avpkt->size) {
libavutil/frame.c+0−5
@@ -230,11 +230,6 @@ static int frame_copy_props(AVFrame *dst, const AVFrame *src, int force_copy) · 229 unmodified lines
230 dst->pts = src->pts;230 dst->pts = src->pts;
231 dst->duration = src->duration;231 dst->duration = src->duration;
232 dst->repeat_pict = src->repeat_pict;232 dst->repeat_pict = src->repeat_pict;
233#if FF_API_PALETTE_HAS_CHANGED
234FF_DISABLE_DEPRECATION_WARNINGS
235 dst->palette_has_changed = src->palette_has_changed;
236FF_ENABLE_DEPRECATION_WARNINGS
237#endif
238 dst->sample_rate = src->sample_rate;233 dst->sample_rate = src->sample_rate;
239 dst->opaque = src->opaque;234 dst->opaque = src->opaque;
240 dst->pkt_dts = src->pkt_dts;235 dst->pkt_dts = src->pkt_dts;
libavutil/frame.h+0−8
@@ -567,14 +567,6 @@ typedef struct AVFrame { · 566 unmodified lines
567 */567 */
568 int repeat_pict;568 int repeat_pict;
569 569
570#if FF_API_PALETTE_HAS_CHANGED
571 /**
572 * Tell user application that palette has changed from previous frame.
573 */
574 attribute_deprecated
575 int palette_has_changed;
576#endif
577
578 /**570 /**
579 * Sample rate of the audio data.571 * Sample rate of the audio data.
580 */572 */
libavutil/version.h+0−1
@@ -105,7 +105,6 @@ · 104 unmodified lines
105 * @{105 * @{
106 */106 */
107 107
108#define FF_API_PALETTE_HAS_CHANGED (LIBAVUTIL_VERSION_MAJOR < 60)
109#define FF_API_VULKAN_CONTIGUOUS_MEMORY (LIBAVUTIL_VERSION_MAJOR < 60)108#define FF_API_VULKAN_CONTIGUOUS_MEMORY (LIBAVUTIL_VERSION_MAJOR < 60)
110#define FF_API_H274_FILM_GRAIN_VCS (LIBAVUTIL_VERSION_MAJOR < 60)109#define FF_API_H274_FILM_GRAIN_VCS (LIBAVUTIL_VERSION_MAJOR < 60)
111#define FF_API_MOD_UINTP2 (LIBAVUTIL_VERSION_MAJOR < 60)110#define FF_API_MOD_UINTP2 (LIBAVUTIL_VERSION_MAJOR < 60)

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