• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/minidlna/ffmpeg-2.3.4/libavcodec/

Lines Matching refs:avctx

32     AVCodecContext *avctx;
41 static av_cold int xan_decode_end(AVCodecContext *avctx)
43 XanContext *s = avctx->priv_data;
53 static av_cold int xan_decode_init(AVCodecContext *avctx)
55 XanContext *s = avctx->priv_data;
57 s->avctx = avctx;
59 avctx->pix_fmt = AV_PIX_FMT_YUV420P;
61 if (avctx->height < 8) {
62 av_log(avctx, AV_LOG_ERROR, "Invalid frame height: %d.\n", avctx->height);
65 if (avctx->width & 1) {
66 av_log(avctx, AV_LOG_ERROR, "Invalid frame width: %d.\n", avctx->width);
70 s->buffer_size = avctx->width * avctx->height;
76 xan_decode_end(avctx);
82 xan_decode_end(avctx);
184 static int xan_decode_chroma(AVCodecContext *avctx, unsigned chroma_off)
186 XanContext *s = avctx->priv_data;
197 av_log(avctx, AV_LOG_ERROR, "Invalid chroma block position\n");
208 av_log(avctx, AV_LOG_ERROR, "Invalid chroma block offset\n");
216 av_log(avctx, AV_LOG_ERROR, "Chroma unpacking failed\n");
225 for (j = 0; j < avctx->height >> 1; j++) {
226 for (i = 0; i < avctx->width >> 1; i++) {
243 if (avctx->height & 1) {
244 memcpy(U, U - s->pic->linesize[1], avctx->width >> 1);
245 memcpy(V, V - s->pic->linesize[2], avctx->width >> 1);
251 for (j = 0; j < avctx->height >> 2; j++) {
252 for (i = 0; i < avctx->width >> 1; i += 2) {
271 if (avctx->height & 3) {
272 int lines = ((avctx->height + 1) >> 1) - (avctx->height >> 2) * 2;
282 static int xan_decode_frame_type0(AVCodecContext *avctx)
284 XanContext *s = avctx->priv_data;
294 if ((ret = xan_decode_chroma(avctx, chroma_off)) != 0)
298 av_log(avctx, AV_LOG_WARNING, "Ignoring invalid correction block position\n");
304 av_log(avctx, AV_LOG_ERROR, "Luma decoding failed\n");
311 for (j = 1; j < avctx->width - 1; j += 2) {
319 ybuf += avctx->width;
321 for (i = 1; i < avctx->height; i++) {
324 for (j = 1; j < avctx->width - 1; j += 2) {
332 ybuf += avctx->width;
351 for (j = 0; j < avctx->height; j++) {
352 for (i = 0; i < avctx->width; i++)
354 src += avctx->width;
361 static int xan_decode_frame_type1(AVCodecContext *avctx)
363 XanContext *s = avctx->priv_data;
369 if ((ret = xan_decode_chroma(avctx, bytestream2_get_le32(&s->gb))) != 0)
376 av_log(avctx, AV_LOG_ERROR, "Luma decoding failed\n");
381 for (i = 0; i < avctx->height; i++) {
384 for (j = 1; j < avctx->width - 1; j += 2) {
391 ybuf += avctx->width;
396 for (j = 0; j < avctx->height; j++) {
397 for (i = 0; i < avctx->width; i++)
399 src += avctx->width;
406 static int xan_decode_frame(AVCodecContext *avctx,
410 XanContext *s = avctx->priv_data;
414 if ((ret = ff_reget_buffer(avctx, s->pic)) < 0)
421 ret = xan_decode_frame_type0(avctx);
424 ret = xan_decode_frame_type1(avctx);
427 av_log(avctx, AV_LOG_ERROR, "Unknown frame type %d\n", ftype);