History

Merge remote-tracking branch 'qatar/master'

* qatar/master: swscale: Fix stack alignment for SSE avcodec: move some AVCodecContext fields to an internal struct. avcodec: use av_opt_set() instead of deprecated av_set_string3() avcodec: fix some const warnings avcodec: remove pointless AVOption, internal_buffer_count imgutils: Fix illegal read. Conflicts: doc/APIchanges libavcodec/avcodec.h libavcodec/version.h

Michael Niedermayer committed 15 years ago

Commit dbb38bc2 parents 90c02ae 09d243d14 files · +140 −65Browse files

Unified · Split

14 files
  1. doc/APIchanges +8 −0
  2. libavcodec/avcodec.h +21 −3
  3. libavcodec/h264.c +2 −1
  4. libavcodec/internal.h +34 −0
  5. libavcodec/mimic.c +3 −1
  6. libavcodec/mpegvideo.c +1 −1
  7. libavcodec/options.c +4 −5
  8. libavcodec/pthread.c +11 −4
  9. libavcodec/utils.c +44 −44
  10. libavcodec/version.h +5 −2
  11. libavcodec/vp3.c +3 −1
  12. libavcodec/vp8.c +2 −1
  13. libavutil/imgutils.c +1 −1
  14. libswscale/swscale_unscaled.c +1 −1
doc/APIchanges+8−0
@@ -19,6 +19,14 @@ API changes, most recent first: · 18 unmodified lines
1919 2011-10-20 - b35e9e1 - lavu 51.22.0
2020 Add av_strtok() to avstring.h.
2121
22+2011-xx-xx - xxxxxxx - lavc 53.21.0
23+ Move some AVCodecContext fields to a new private struct, AVCodecInternal,
24+ which is accessed from a new field, AVCodecContext.internal.
25+ - fields moved:
26+ AVCodecContext.internal_buffer --> AVCodecInternal.buffer
27+ AVCodecContext.internal_buffer_count --> AVCodecInternal.buffer_count
28+ AVCodecContext.is_copy --> AVCodecInternal.is_copy
29+
2230 2011-11-13 - lavf 53.15.0
2331 New interrupt callback API, allowing per-AVFormatContext/AVIOContext
2432 interrupt callbacks.
libavcodec/avcodec.h+21−3
@@ -1214,6 +1214,8 @@ typedef struct AVFrame { · 1213 unmodified lines
12141214
12151215 } AVFrame;
12161216
1217+struct AVCodecInternal;
1218+
12171219 /**
12181220 * main external API structure.
12191221 * New fields can be added to the end with minor version bumps.
@@ -2041,17 +2043,21 @@ typedef struct AVCodecContext { · 821 unmodified lines
20412043 */
20422044 int color_table_id;
20432045
2046+#if FF_API_INTERNAL_CONTEXT
20442047 /**
20452048 * internal_buffer count
20462049 * Don't touch, used by libavcodec default_get_buffer().
2050+ * @deprecated this field was moved to an internal context
20472051 */
2048− int internal_buffer_count;
2052+ attribute_deprecated int internal_buffer_count;
20492053
20502054 /**
20512055 * internal_buffers
20522056 * Don't touch, used by libavcodec default_get_buffer().
2057+ * @deprecated this field was moved to an internal context
20532058 */
2054− void *internal_buffer;
2059+ attribute_deprecated void *internal_buffer;
2060+#endif
20552061
20562062 /**
20572063 * Global quality for codecs which cannot change it per frame.
@@ -2937,14 +2943,18 @@ typedef struct AVCodecContext { · 879 unmodified lines
29372943 */
29382944 AVPacket *pkt;
29392945
2946+#if FF_API_INTERNAL_CONTEXT
29402947 /**
29412948 * Whether this is a copy of the context which had init() called on it.
29422949 * This is used by multithreading - shared tables and picture pointers
29432950 * should be freed from the original context only.
29442951 * - encoding: Set by libavcodec.
29452952 * - decoding: Set by libavcodec.
2953+ *
2954+ * @deprecated this field has been moved to an internal context
29462955 */
2947− int is_copy;
2956+ attribute_deprecated int is_copy;
2957+#endif
29482958
29492959 /**
29502960 * Which multithreading methods to use.
@@ -3013,6 +3023,14 @@ typedef struct AVCodecContext { · 62 unmodified lines
30133023 #define AV_EF_COMPLIANT (1<<17)
30143024 #define AV_EF_AGGRESSIVE (1<<18)
30153025
3026+ /**
3027+ * Private context used for internal data.
3028+ *
3029+ * Unlike priv_data, this is not codec-specific. It is used in general
3030+ * libavcodec functions.
3031+ */
3032+ struct AVCodecInternal *internal;
3033+
30163034 /**
30173035 * Current statistics for PTS correction.
30183036 * - decoding: maintained and used by libavcodec, not intended to be used by user apps
libavcodec/h264.c+2−1
@@ -1205,7 +1205,8 @@ static void copy_parameter_set(void **to, void **from, int count, int size) · 1204 unmodified lines
12051205 static int decode_init_thread_copy(AVCodecContext *avctx){
12061206 H264Context *h= avctx->priv_data;
12071207
1208− if (!avctx->is_copy) return 0;
1208+ if (!avctx->internal->is_copy)
1209+ return 0;
12091210 memset(h->sps_buffers, 0, sizeof(h->sps_buffers));
12101211 memset(h->pps_buffers, 0, sizeof(h->pps_buffers));
12111212
libavcodec/internal.h+34−0
@@ -25,8 +25,42 @@ · 24 unmodified lines
2525 #define AVCODEC_INTERNAL_H
2626
2727 #include <stdint.h>
28+
29+#include "libavutil/pixfmt.h"
2830 #include "avcodec.h"
2931
32+typedef struct InternalBuffer {
33+ int last_pic_num;
34+ uint8_t *base[4];
35+ uint8_t *data[4];
36+ int linesize[4];
37+ int width;
38+ int height;
39+ enum PixelFormat pix_fmt;
40+} InternalBuffer;
41+
42+typedef struct AVCodecInternal {
43+ /**
44+ * internal buffer count
45+ * used by default get/release/reget_buffer().
46+ */
47+ int buffer_count;
48+
49+ /**
50+ * internal buffers
51+ * used by default get/release/reget_buffer().
52+ */
53+ InternalBuffer *buffer;
54+
55+ /**
56+ * Whether the parent AVCodecContext is a copy of the context which had
57+ * init() called on it.
58+ * This is used by multithreading - shared tables and picture pointers
59+ * should be freed from the original context only.
60+ */
61+ int is_copy;
62+} AVCodecInternal;
63+
3064 struct AVCodecDefault {
3165 const uint8_t *key;
3266 const uint8_t *value;
libavcodec/mimic.c+3−1
@@ -24,6 +24,7 @@ · 23 unmodified lines
2424 #include <stdint.h>
2525
2626 #include "avcodec.h"
27+#include "internal.h"
2728 #include "get_bits.h"
2829 #include "bytestream.h"
2930 #include "dsputil.h"
@@ -405,7 +406,8 @@ static av_cold int mimic_decode_end(AVCodecContext *avctx) · 375 unmodified lines
405406
406407 av_free(ctx->swap_buf);
407408
408− if(avctx->is_copy) return 0;
409+ if (avctx->internal->is_copy)
410+ return 0;
409411
410412 for(i = 0; i < 16; i++)
411413 if(ctx->buf_ptrs[i].data[0])
libavcodec/mpegvideo.c+1−1
@@ -859,7 +859,7 @@ void MPV_common_end(MpegEncContext *s) · 858 unmodified lines
859859 av_freep(&s->reordered_input_picture);
860860 av_freep(&s->dct_offset);
861861
862− if(s->picture && !s->avctx->is_copy){
862+ if(s->picture && !s->avctx->internal->is_copy){
863863 for(i=0; i<s->picture_count; i++){
864864 free_picture(s, &s->picture[i]);
865865 }
libavcodec/options.c+4−5
@@ -330,7 +330,6 @@ static const AVOption options[]={ · 329 unmodified lines
330330 {"ibias", "intra quant bias", OFFSET(intra_quant_bias), AV_OPT_TYPE_INT, {.dbl = FF_DEFAULT_QUANT_BIAS }, INT_MIN, INT_MAX, V|E},
331331 {"pbias", "inter quant bias", OFFSET(inter_quant_bias), AV_OPT_TYPE_INT, {.dbl = FF_DEFAULT_QUANT_BIAS }, INT_MIN, INT_MAX, V|E},
332332 {"color_table_id", NULL, OFFSET(color_table_id), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX},
333−{"internal_buffer_count", NULL, OFFSET(internal_buffer_count), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX},
334333 {"global_quality", NULL, OFFSET(global_quality), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|A|E},
335334 {"coder", NULL, OFFSET(coder_type), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E, "coder"},
336335 {"vlc", "variable length coder / huffman coder", 0, AV_OPT_TYPE_CONST, {.dbl = FF_CODER_TYPE_VLC }, INT_MIN, INT_MAX, V|E, "coder"},
@@ -590,15 +589,15 @@ int avcodec_get_context_defaults3(AVCodecContext *s, AVCodec *codec){ · 253 unmodified lines
590589 }
591590 }
592591 if(codec->priv_class){
593− *(AVClass**)s->priv_data= codec->priv_class;
592+ *(const AVClass**)s->priv_data = codec->priv_class;
594593 av_opt_set_defaults(s->priv_data);
595594 }
596595 }
597596 if (codec && codec->defaults) {
598597 int ret;
599− AVCodecDefault *d = codec->defaults;
598+ const AVCodecDefault *d = codec->defaults;
600599 while (d->key) {
601− ret = av_set_string3(s, d->key, d->value, 0, NULL);
600+ ret = av_opt_set(s, d->key, d->value, 0);
602601 av_assert0(ret >= 0);
603602 d++;
604603 }
@@ -653,9 +652,9 @@ int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src) · 48 unmodified lines
653652 dest->priv_data = NULL;
654653 dest->codec = NULL;
655654 dest->slice_offset = NULL;
656− dest->internal_buffer = NULL;
657655 dest->hwaccel = NULL;
658656 dest->thread_opaque = NULL;
657+ dest->internal = NULL;
659658
660659 /* reallocate values that should be allocated separately */
661660 dest->rc_eq = NULL;
libavcodec/pthread.c+11−4
@@ -679,8 +679,10 @@ static void frame_thread_free(AVCodecContext *avctx, int thread_count) · 678 unmodified lines
679679 pthread_cond_destroy(&p->output_cond);
680680 av_freep(&p->avpkt.data);
681681
682− if (i)
682+ if (i) {
683683 av_freep(&p->avctx->priv_data);
684+ av_freep(&p->avctx->internal);
685+ }
684686
685687 av_freep(&p->avctx);
686688 }
@@ -734,9 +736,15 @@ static int frame_thread_init(AVCodecContext *avctx) · 47 unmodified lines
734736
735737 update_context_from_thread(avctx, copy, 1);
736738 } else {
737− copy->is_copy = 1;
738739 copy->priv_data = av_malloc(codec->priv_data_size);
739740 memcpy(copy->priv_data, src->priv_data, codec->priv_data_size);
741+ copy->internal = av_malloc(sizeof(AVCodecInternal));
742+ if (!copy->internal) {
743+ err = AVERROR(ENOMEM);
744+ goto error;
745+ }
746+ *(copy->internal) = *(src->internal);
747+ copy->internal->is_copy = 1;
740748
741749 if (codec->init_thread_copy)
742750 err = codec->init_thread_copy(copy);
@@ -870,8 +878,7 @@ void ff_thread_release_buffer(AVCodecContext *avctx, AVFrame *f) · 127 unmodified lines
870878 }
871879
872880 if(avctx->debug & FF_DEBUG_BUFFERS)
873− av_log(avctx, AV_LOG_DEBUG, "thread_release_buffer called on pic %p, %d buffers used\n",
874− f, f->owner->internal_buffer_count);
881+ av_log(avctx, AV_LOG_DEBUG, "thread_release_buffer called on pic %p\n", f);
875882
876883 fctx = p->parent;
877884 pthread_mutex_lock(&fctx->buffer_mutex);
libavcodec/utils.c+44−44
@@ -125,15 +125,6 @@ void avcodec_set_dimensions(AVCodecContext *s, int width, int height){ · 124 unmodified lines
125125 s->height= -((-height)>>s->lowres);
126126 }
127127
128−typedef struct InternalBuffer{
129− int last_pic_num;
130− uint8_t *base[4];
131− uint8_t *data[4];
132− int linesize[4];
133− int width, height;
134− enum PixelFormat pix_fmt;
135−}InternalBuffer;
136−
137128 #define INTERNAL_BUFFER_SIZE (32+1)
138129
139130 void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, int linesize_align[4]){
@@ -267,32 +258,27 @@ int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic){ · 127 unmodified lines
267258 int h= s->height;
268259 InternalBuffer *buf;
269260 int *picture_number;
261+ AVCodecInternal *avci = s->internal;
270262
271263 if(pic->data[0]!=NULL) {
272264 av_log(s, AV_LOG_ERROR, "pic->data[0]!=NULL in avcodec_default_get_buffer\n");
273265 return -1;
274266 }
275− if(s->internal_buffer_count >= INTERNAL_BUFFER_SIZE) {
276− av_log(s, AV_LOG_ERROR, "internal_buffer_count overflow (missing release_buffer?)\n");
267+ if(avci->buffer_count >= INTERNAL_BUFFER_SIZE) {
268+ av_log(s, AV_LOG_ERROR, "buffer_count overflow (missing release_buffer?)\n");
277269 return -1;
278270 }
279271
280272 if(av_image_check_size(w, h, 0, s))
281273 return -1;
282274
283− if(s->internal_buffer==NULL){
284− s->internal_buffer= av_mallocz((INTERNAL_BUFFER_SIZE+1)*sizeof(InternalBuffer));
275+ if (!avci->buffer) {
276+ avci->buffer = av_mallocz((INTERNAL_BUFFER_SIZE+1) *
277+ sizeof(InternalBuffer));
285278 }
286−#if 0
287− s->internal_buffer= av_fast_realloc(
288− s->internal_buffer,
289− &s->internal_buffer_size,
290− sizeof(InternalBuffer)*FFMAX(99, s->internal_buffer_count+1)/*FIXME*/
291− );
292−#endif
293279
294− buf= &((InternalBuffer*)s->internal_buffer)[s->internal_buffer_count];
295− picture_number= &(((InternalBuffer*)s->internal_buffer)[INTERNAL_BUFFER_SIZE]).last_pic_num; //FIXME ugly hack
280+ buf = &avci->buffer[avci->buffer_count];
281+ picture_number = &(avci->buffer[INTERNAL_BUFFER_SIZE]).last_pic_num; //FIXME ugly hack
296282 (*picture_number)++;
297283
298284 if(buf->base[0] && (buf->width != w || buf->height != h || buf->pix_fmt != s->pix_fmt)){
@@ -383,7 +369,7 @@ int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic){ · 84 unmodified lines
383369 pic->data[i]= buf->data[i];
384370 pic->linesize[i]= buf->linesize[i];
385371 }
386− s->internal_buffer_count++;
372+ avci->buffer_count++;
387373
388374 if (s->pkt) {
389375 pic->pkt_pts = s->pkt->pts;
@@ -399,7 +385,8 @@ int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic){ · 9 unmodified lines
399385 pic->format = s->pix_fmt;
400386
401387 if(s->debug&FF_DEBUG_BUFFERS)
402− av_log(s, AV_LOG_DEBUG, "default_get_buffer called on pic %p, %d buffers used\n", pic, s->internal_buffer_count);
388+ av_log(s, AV_LOG_DEBUG, "default_get_buffer called on pic %p, %d "
389+ "buffers used\n", pic, avci->buffer_count);
403390
404391 return 0;
405392 }
@@ -407,22 +394,23 @@ int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic){ · 1 unmodified line
407394 void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic){
408395 int i;
409396 InternalBuffer *buf, *last;
397+ AVCodecInternal *avci = s->internal;
410398
411399 assert(pic->type==FF_BUFFER_TYPE_INTERNAL);
412− assert(s->internal_buffer_count);
413−
414− if(s->internal_buffer){
415− buf = NULL; /* avoids warning */
416− for(i=0; i<s->internal_buffer_count; i++){ //just 3-5 checks so is not worth to optimize
417− buf= &((InternalBuffer*)s->internal_buffer)[i];
418− if(buf->data[0] == pic->data[0])
419− break;
420− }
421− assert(i < s->internal_buffer_count);
422− s->internal_buffer_count--;
423− last = &((InternalBuffer*)s->internal_buffer)[s->internal_buffer_count];
400+ assert(avci->buffer_count);
401+
402+ if (avci->buffer) {
403+ buf = NULL; /* avoids warning */
404+ for (i = 0; i < avci->buffer_count; i++) { //just 3-5 checks so is not worth to optimize
405+ buf = &avci->buffer[i];
406+ if (buf->data[0] == pic->data[0])
407+ break;
408+ }
409+ assert(i < avci->buffer_count);
410+ avci->buffer_count--;
411+ last = &avci->buffer[avci->buffer_count];
424412
425− FFSWAP(InternalBuffer, *buf, *last);
413+ FFSWAP(InternalBuffer, *buf, *last);
426414 }
427415
428416 for(i=0; i<4; i++){
@@ -432,7 +420,8 @@ void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic){ · 3 unmodified lines
432420 //printf("R%X\n", pic->opaque);
433421
434422 if(s->debug&FF_DEBUG_BUFFERS)
435− av_log(s, AV_LOG_DEBUG, "default_release_buffer called on pic %p, %d buffers used\n", pic, s->internal_buffer_count);
423+ av_log(s, AV_LOG_DEBUG, "default_release_buffer called on pic %p, %d "
424+ "buffers used\n", pic, avci->buffer_count);
436425 }
437426
438427 int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic){
@@ -556,6 +545,12 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD · 117 unmodified lines
556545 goto end;
557546 }
558547
548+ avctx->internal = av_mallocz(sizeof(AVCodecInternal));
549+ if (!avctx->internal) {
550+ ret = AVERROR(ENOMEM);
551+ goto end;
552+ }
553+
559554 if (codec->priv_data_size > 0) {
560555 if(!avctx->priv_data){
561556 avctx->priv_data = av_mallocz(codec->priv_data_size);
@@ -721,6 +716,7 @@ end: · 159 unmodified lines
721716 free_and_end:
722717 av_dict_free(&tmp);
723718 av_freep(&avctx->priv_data);
719+ av_freep(&avctx->internal);
724720 avctx->codec= NULL;
725721 goto end;
726722 }
@@ -945,6 +941,7 @@ av_cold int avcodec_close(AVCodecContext *avctx) · 218 unmodified lines
945941 avctx->codec->close(avctx);
946942 avcodec_default_free_buffers(avctx);
947943 avctx->coded_frame = NULL;
944+ av_freep(&avctx->internal);
948945 if (avctx->codec && avctx->codec->priv_class)
949946 av_opt_free(avctx->priv_data);
950947 av_opt_free(avctx);
@@ -1223,22 +1220,25 @@ void avcodec_flush_buffers(AVCodecContext *avctx) · 272 unmodified lines
12231220 }
12241221
12251222 void avcodec_default_free_buffers(AVCodecContext *s){
1223+ AVCodecInternal *avci = s->internal;
12261224 int i, j;
12271225
1228− if(s->internal_buffer==NULL) return;
1226+ if (!avci->buffer)
1227+ return;
12291228
1230− if (s->internal_buffer_count)
1231− av_log(s, AV_LOG_WARNING, "Found %i unreleased buffers!\n", s->internal_buffer_count);
1229+ if (avci->buffer_count)
1230+ av_log(s, AV_LOG_WARNING, "Found %i unreleased buffers!\n",
1231+ avci->buffer_count);
12321232 for(i=0; i<INTERNAL_BUFFER_SIZE; i++){
1233− InternalBuffer *buf= &((InternalBuffer*)s->internal_buffer)[i];
1233+ InternalBuffer *buf = &avci->buffer[i];
12341234 for(j=0; j<4; j++){
12351235 av_freep(&buf->base[j]);
12361236 buf->data[j]= NULL;
12371237 }
12381238 }
1239− av_freep(&s->internal_buffer);
1239+ av_freep(&avci->buffer);
12401240
1241− s->internal_buffer_count=0;
1241+ avci->buffer_count=0;
12421242 }
12431243
12441244 #if FF_API_OLD_FF_PICT_TYPES
libavcodec/version.h+5−2
@@ -21,8 +21,8 @@ · 20 unmodified lines
2121 #define AVCODEC_VERSION_H
2222
2323 #define LIBAVCODEC_VERSION_MAJOR 53
24−#define LIBAVCODEC_VERSION_MINOR 35
25−#define LIBAVCODEC_VERSION_MICRO 1
24+#define LIBAVCODEC_VERSION_MINOR 36
25+#define LIBAVCODEC_VERSION_MICRO 0
2626
2727 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
2828 LIBAVCODEC_VERSION_MINOR, \
@@ -104,5 +104,8 @@ · 75 unmodified lines
104104 #ifndef FF_API_PARSE_FRAME
105105 #define FF_API_PARSE_FRAME (LIBAVCODEC_VERSION_MAJOR < 54)
106106 #endif
107+#ifndef FF_API_INTERNAL_CONTEXT
108+#define FF_API_INTERNAL_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 54)
109+#endif
107110
108111 #endif /* AVCODEC_VERSION_H */
libavcodec/vp3.c+3−1
@@ -35,6 +35,7 @@ · 34 unmodified lines
3535
3636 #include "libavutil/imgutils.h"
3737 #include "avcodec.h"
38+#include "internal.h"
3839 #include "dsputil.h"
3940 #include "get_bits.h"
4041
@@ -2011,7 +2012,8 @@ static av_cold int vp3_decode_end(AVCodecContext *avctx) · 1970 unmodified lines
20112012 av_free(s->motion_val[1]);
20122013 av_free(s->edge_emu_buffer);
20132014
2014− if (avctx->is_copy) return 0;
2015+ if (avctx->internal->is_copy)
2016+ return 0;
20152017
20162018 for (i = 0; i < 16; i++) {
20172019 free_vlc(&s->dc_vlc[i]);
libavcodec/vp8.c+2−1
@@ -24,6 +24,7 @@ · 23 unmodified lines
2424
2525 #include "libavutil/imgutils.h"
2626 #include "avcodec.h"
27+#include "internal.h"
2728 #include "vp8.h"
2829 #include "vp8data.h"
2930 #include "rectangle.h"
@@ -88,7 +89,7 @@ static void vp8_decode_flush_impl(AVCodecContext *avctx, · 58 unmodified lines
8889 VP8Context *s = avctx->priv_data;
8990 int i;
9091
91− if (!avctx->is_copy) {
92+ if (!avctx->internal->is_copy) {
9293 for (i = 0; i < 5; i++)
9394 if (s->frames[i].data[0])
9495 vp8_release_frame(s, &s->frames[i], prefer_delayed_free, can_direct_free);
libavutil/imgutils.c+1−1
@@ -126,7 +126,7 @@ int av_image_fill_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, int heigh · 125 unmodified lines
126126 has_plane[desc->comp[i].plane] = 1;
127127
128128 total_size = size[0];
129− for (i = 1; has_plane[i] && i < 4; i++) {
129+ for (i = 1; i < 4 && has_plane[i]; i++) {
130130 int h, s = (i == 1 || i == 2) ? desc->log2_chroma_h : 0;
131131 data[i] = data[i-1] + size[i-1];
132132 h = (height + (1 << s) - 1) >> s;
libswscale/swscale_unscaled.c+1−1
@@ -790,7 +790,7 @@ static int check_image_pointers(const uint8_t * const data[4], enum PixelFormat · 789 unmodified lines
790790 * swscale wrapper, so we don't need to export the SwsContext.
791791 * Assumes planar YUV to be in YUV order instead of YVU.
792792 */
793−int sws_scale(struct SwsContext *c, const uint8_t* const srcSlice[],
793+int attribute_align_arg sws_scale(struct SwsContext *c, const uint8_t* const srcSlice[],
794794 const int srcStride[], int srcSliceY, int srcSliceH,
795795 uint8_t* const dst[], const int dstStride[])
796796 {

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